Commit aebc1645 by BellCodeEditor

save project

parent 036cae9b
Showing with 7 additions and 3 deletions
...@@ -4,9 +4,12 @@ print(name) ...@@ -4,9 +4,12 @@ print(name)
a=["石头","剪刀","布"] a=["石头","剪刀","布"]
p=random.choice(a) p=random.choice(a)
print(p) print(p)
if name==a: if name in a:
if name==p:
print("平局") print("平局")
elif (name=="石头"and a=="剪刀") or (name=="剪刀"and a=="布")or(name=="布"and a=="石头"): elif (name=="石头"and p=="剪刀") or (name=="剪刀"and p=="布")or(name=="布"and p=="石头"):
print("我输了") print("我输了")
else: else:
print("你赢了") print("你赢了")
else:
print("CHUO")
\ 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