Commit 5b989ec4 by BellCodeEditor

save project

parent f6758ef7
Showing with 9 additions and 6 deletions
...@@ -3,9 +3,12 @@ y=input("请出拳(剪刀/石头/布):") ...@@ -3,9 +3,12 @@ y=input("请出拳(剪刀/石头/布):")
print("玩家出:"+player) print("玩家出:"+player)
x=random('剪刀','石头','布') x=random('剪刀','石头','布')
print(x) print(x)
if x==y: if y=='剪刀' or y=='石头' or y=='布'
print("平局") if x==y:
elif (y=='石头' and x=='剪刀') or (y=='剪刀' and x=='布') or (y=='布' and x=='石头'): print("平局")
print("赢") elif (y=='石头' and x=='剪刀') or (y=='剪刀' and x=='布') or (y=='布' and x=='石头'):
print("赢")
else:
print("输")
else: else:
print("输") print('不成立')
\ No newline at end of file \ 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