Commit f21cc91a by BellCodeEditor

save project

parent c2017a11
Showing with 9 additions and 7 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:
print("平局") if a==letter:
elif (a=="剪刀" and letter=="布")or (a=="布" and letter=="石头") or (a=="石头" and letter=="布"): print("平局")
print("you win") elif (a=="剪刀" and letter=="布")or (a=="布" and letter=="石头") or (a=="石头" and letter=="布"):
else: print("you win")
print("you lose") else:
\ No newline at end of file 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