Commit c714c3bc by BellCodeEditor

save project

parent 9553bb31
Showing with 13 additions and 10 deletions
...@@ -3,15 +3,18 @@ player=input("要出啥,石,剪,布") ...@@ -3,15 +3,18 @@ player=input("要出啥,石,剪,布")
print("玩家出"+player)# 玩家出拳 print("玩家出"+player)# 玩家出拳
computer=random.choice(["石","剪","布"]) computer=random.choice(["石","剪","布"])
print("电脑出"+computer) print("电脑出"+computer)
if player==computer: if player==("剪","布","石"):
print("平局") if player==computer:
elif player=="剪"and computer=="布": print("平局")
print("恭喜你发财") elif player=="剪"and computer=="布":
elif player=="布"and computer=="石": print("恭喜你发财")
print("恭喜你发财") elif player=="布"and computer=="石":
elif player=="石"and computer=="剪": print("恭喜你发财")
print("恭喜你发财") elif player=="石"and computer=="剪":
print("恭喜你发财")
else:
print("你好菜啊")
else: else:
print("你好菜啊") 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