Commit c95b939a by BellCodeEditor

save project

parent 0adb7536
Showing with 9 additions and 5 deletions
......@@ -3,8 +3,11 @@ a=input("玩家选择:")
print("玩家出拳"+a)
#计算
import random
list=("石头,剪刀,布")
computer=random.choice()
list=["石头","剪刀","布"]
computer=random.choice(list)
if a == computer:
print("平局")
elif(a=="石头" and computer=="剪刀") or (a=="剪刀" and computer=="布") or (a=="布" and computer=="石头"):
print("获胜")
else:
print("输啦")
\ No newline at end of file
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