Commit 3f9e1b15 by BellCodeEditor

save project

parent 7ff8f18a
Showing with 7 additions and 4 deletions
import random import random
player=input("请出拳:石头/剪刀/布")# 玩家出拳 while True:
if player==list: player=input("请出拳:石头/剪刀/布")# 玩家出拳
print("玩家出拳:"+player)
list=["石头","剪刀","布"] list=["石头","剪刀","布"]
if player in list:
print("玩家出拳:"+player)
a=random.choice(list) a=random.choice(list)
print("计算机出拳:"+a) print("计算机出拳:"+a)
if player==a: if player==a:
...@@ -11,5 +13,5 @@ if player==list: ...@@ -11,5 +13,5 @@ if player==list:
print("玩家获胜") print("玩家获胜")
else: else:
print("计算机获胜") print("计算机获胜")
else: 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