Commit 22960463 by BellCodeEditor

save project

parent bd18cd4e
Showing with 9 additions and 6 deletions
...@@ -4,9 +4,12 @@ import random ...@@ -4,9 +4,12 @@ import random
a=["1","2","3"] a=["1","2","3"]
n=random.choice(a) n=random.choice(a)
print(n) print(n)
if p==n: if p in a :
print(平局) if p==n:
elif p=="1" and n=="2" or p=="2" and n=="3" or p=="3" and n=="1": print("平局")
print(你赢了!) elif p=="1" and n=="2" or p=="2" and n=="3" or p=="3" and n=="1":
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