Commit 7671ba60 by BellCodeEditor

save project

parent d5615c09
Showing with 17 additions and 8 deletions
# 玩家出拳 while True:
import random import random
player=input("输入") player=input("输入")
print("出拳:"+player) print("出拳:"+player)
a=["石头","剪刀","布"] a=["石头","剪刀","布"]
computer=random.choice(a) computer=random.choice(a)
print("人机出拳:"+computer) print("人机出拳:"+computer)
\ No newline at end of file if player in list:
if player==computer:
print("平局")
elif (player=="石头" and computer=="剪刀")or(player=="剪刀" and computer=="布")or(player=="布" and computer=="石头")
print("赢了")
else:
print(书了)
else:
print(输入错误)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment