Commit f21cc91a by BellCodeEditor

save project

parent c2017a11
Showing with 6 additions and 3 deletions
...@@ -5,9 +5,11 @@ import random ...@@ -5,9 +5,11 @@ import random
List=["石头","剪刀","布" ] List=["石头","剪刀","布" ]
letter=random.choice(List) letter=random.choice(List)
print(letter) print(letter)
if a==letter: if a in List:
if a==letter:
print("平局") print("平局")
elif (a=="剪刀" and letter=="布")or (a=="布" and letter=="石头") or (a=="石头" and letter=="布"): elif (a=="剪刀" and letter=="布")or (a=="布" and letter=="石头") or (a=="石头" and letter=="布"):
print("you win") print("you win")
else: else:
print("you lose") print("you lose")
else
\ 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