Commit 31d9dc5e by BellCodeEditor

save project

parent ba589e99
Showing with 35 additions and 3 deletions
# 计算机出拳
import random
a=["剪刀","石头","布"]
b=random.choice(a)
print("出拳:"+ b)
player=input("请出拳(石头/剪刀/布):")
print("玩家出拳:"+player)
list=["剪刀","石头","布"]
c=random.choice(list)
print("电脑出拳:"+ c)
if player at list:
if player == list:
print("平局xxs")
elif (player=="石头" and list=="剪刀")or(player=="剪刀" and list=="布")or(player=="布" and list=="石头"):
print("你赢了xxs")
else:
print("你输了xxs")
else:
print("输入错误")
\ No newline at end of file
# 计算机出拳
import random
player=input("请出拳(石头/剪刀/布):")
print("玩家出拳:"+player)
list=["剪刀","石头","布"]
c=random.choice(list)
print("电脑出拳:"+ c)
if player == list:
print("平局xxs")
elif (player=="石头" and list=="剪刀")or(player=="剪刀" and list=="布")or(player=="布" and list=="石头"):
print("你赢了xxs")
else:
print("你输了xxs")
\ 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