Commit 616512ba by BellCodeEditor

save project

parent 5f1de396
Showing with 8 additions and 2 deletions
...@@ -3,4 +3,10 @@ c=input("你要出什么?") ...@@ -3,4 +3,10 @@ c=input("你要出什么?")
print("玩家出拳"+c) print("玩家出拳"+c)
list=["石头","剪刀","布"] list=["石头","剪刀","布"]
tv=random.choice(list) tv=random.choice(list)
print("计算机出拳"+tv) print("计算机出拳"+tv)
\ No newline at end of file if tv==c:
print("平局")
elif (tv=="石头"and c=="布" or tv=="剪刀"and c=="石头" or tv=="布"and c=="剪刀"):
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