Commit 36a9b5a2 by BellCodeEditor

auto save

parent 5c6f1eb4
Showing with 22 additions and 0 deletions
import random
list=["1","2","3","4"]
name=random.choice(list)
print(name)
\ No newline at end of file
# 玩家出拳 # 玩家出拳
import random
b=input("请输入(剪刀/石头/布):")
print("玩家出拳:"+b)
list=["石头","剪刀","布"]
a=random.choice(list)
print("电脑出拳:"+a)
if b in list:
if a==b:
print("平局")
elif(a=="石头" and b=="布") or (a=="剪刀" and b=="石头") or (a=="布" and b=="剪刀"):
print("恭喜你,赢了")
else:
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