Commit 42198f24 by BellCodeEditor

save project

parent 17c56c7c
Showing with 9 additions and 2 deletions
...@@ -2,5 +2,11 @@ player=input("请出拳:石头/剪刀/布")# 玩家出拳 ...@@ -2,5 +2,11 @@ player=input("请出拳:石头/剪刀/布")# 玩家出拳
print("玩家出拳:"+player) print("玩家出拳:"+player)
import random import random
name=["石头","剪刀","布"] name=["石头","剪刀","布"]
compture=random.choice(name) computer=random.choice(name)
print(computer)
if player==computre
print("平局")
elif(player=="石头"and comuter=="剪刀")or(player=="剪刀"and comuter=="布"or(player=="布"and comuter=="石头")
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