Commit 973db63b by BellCodeEditor

save project

parent c84dc40f
Showing with 18 additions and 15 deletions
......@@ -7,17 +7,20 @@ import random
listl=["石头","剪刀","布"]
r=random.choice(listl)
print("计算机出拳:"+r)
if p==r:
print("平局了")
elif p=="石头" and r=="剪刀":
print("赢了")
elif p=="布" and r=="石头":
print("赢了")
elif p=="剪刀" and r=="布":
print("赢了")
elif p=="布" and r=="剪刀":
print("输了")
elif p=="石头" and r=="布":
print("输了")
elif p=="剪刀" and r=="石头":
print("输了")
\ No newline at end of file
if p in listl:
if p==r:
print("平局了")
elif p=="石头" and r=="剪刀":
print("赢了")
elif p=="布" and r=="石头":
print("赢了")
elif p=="剪刀" and r=="布":
print("赢了")
elif p=="布" and r=="剪刀":
print("输了")
elif p=="石头" and r=="布":
print("输了")
elif p=="剪刀" and r=="石头":
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