Commit 395a7662 by BellCodeEditor

save project

parent 2b28802d
Showing with 10 additions and 6 deletions
......@@ -6,13 +6,17 @@ import random
list=["剪刀","石头","布"]
n=random.choice(list)
print("电脑出拳是:"+n)
if n==player:
if player in list:
if n==player:
print("平局")
elif(n=="剪刀"and player=="石头"):
elif(n=="剪刀"and player=="石头"):
print("恭喜!你赢了!")
elif(n=="石头"and player=="布"):
elif(n=="石头"and player=="布"):
print("恭喜!你赢了!")
elif(n=="布"and player=="剪刀"):
elif(n=="布"and player=="剪刀"):
print("恭喜!你赢了!")
else:
print("很遗憾,你输了")
else:
print("很遗憾,你输了")
\ No newline at end of file
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