Commit a285fe8c by BellCodeEditor

save project

parent b8eff7ea
Showing with 11 additions and 5 deletions
player=input("请输入你要出的拳(石头,剪刀,布):")
print("玩家出的拳是:"+player)
"""q
p=input("请输入你要出的拳(石头,剪刀,布):")
print("玩家出的拳是:"+p)
"""
电脑出拳
"""
import random
list=["石头","剪刀","布"]
q=random.choice(list)
print("电脑出的拳是:"+q)
\ No newline at end of file
print("电脑出的拳是:"+q)
if p==q:
print("平局")
elif (p=="石头" and q=="剪刀" )or (p=="布" and q=="石头") or (p=="剪刀" and q=="布") :
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