Commit e9894cee by BellCodeEditor

save project

parent af447347
Showing with 10 additions and 5 deletions
......@@ -5,9 +5,13 @@ import random
list=["石头","剪刀","布"]
d=random.choice(list)
print("计算机出拳"+d)
if h==d:
print("平局")
elif (h=="石头" and d=="剪刀") or (h=="剪刀" and d=="布") or (h=="布" and d=="石头"):
print("很遗憾,你赢了")
if h in list:
if h==d:
print("平局")
elif (h=="石头" and d=="剪刀") or (h=="剪刀" and d=="布") or (h=="布" and d=="石头"):
print("很遗憾,你赢了")
else:
print("恭喜你,你输了")
else:
print("恭喜你,你输了")
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