Commit 6a460333 by BellCodeEditor

save project

parent f1f90204
Showing with 10 additions and 7 deletions
...@@ -3,9 +3,12 @@ play=input("剪刀/石头/布") ...@@ -3,9 +3,12 @@ play=input("剪刀/石头/布")
rom=random.choice("剪刀/石头/布") rom=random.choice("剪刀/石头/布")
print("玩家出拳"+play) print("玩家出拳"+play)
print("电脑出拳"+rom) print("电脑出拳"+rom)
if play==rom: if piay in list:
print("平局") if play==rom:
elif play=="剪刀"and rom=="布" or play=="石头" and rom=="剪刀" or piay=="布" and rom=="石头": print("平局")
print("赢") elif (play=="剪刀"and rom=="布") or (play=="石头" and rom=="剪刀") or (piay=="布" and rom=="石头"):
else : print("赢")
print("输") else :
\ No newline at end of file print("输")
elif:
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