Commit 6c8dcd17 by BellCodeEditor

save project

parent 4cac003e
Showing with 24 additions and 3 deletions
neme=input("输入名字") import random
print(neme+"你好啊") p=input("玩家出石头,剪刀,布")
\ No newline at end of file print("玩家出的是:"+p)
l=["石头,剪刀,布"]
if p in l:
d=random.choice(l)
print("电脑出的是:"+d)
if p==d:
print("平局")
elif(p=="石头"and d=="剪刀"):
print("玩家赢了")
elif(p=="布"and d=="石头"):
print("玩家赢了")
elif(p=="剪刀"and d=="布"):
print("玩家赢了")
else:
print("电脑赢了")
else:
print("你输入错了")
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