Commit 17eb4bc6 by BellCodeEditor

save project

parent 4107d1d1
Showing with 13 additions and 10 deletions
......@@ -5,13 +5,16 @@ print("玩家出拳:",p)
list1=["石头","剪刀","布"]
c=random.choice(list1)
print("电脑出拳:",c)
if p==c:
print("平局")
elif p=="石头" and c=="剪刀":
print("you win!")
elif p=="剪刀" and c=="布":
print("you win!")
elif p=="布" and c=="石头":
print("you win!")
if p in list1:
if p==c:
print("平局")
elif p=="石头" and c=="剪刀":
print("you win!")
elif p=="剪刀" and c=="布":
print("you win!")
elif p=="布" and c=="石头":
print("you win!")
else:
print("you lose!")
else:
print("you lose!")
\ No newline at end of file
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