Commit 570c9bca by BellCodeEditor

save project

parent fe0878af
Showing with 19 additions and 10 deletions
if palyer == computer: import random
print("平局") palyer = input("请你出拳:")
elif palyer == "石头" and computer == "剪刀": list = ["石头","剪刀","布"]
print("你赢了") computer = random.choice(list)
elif palyer == "剪刀" and computer == "布": print("玩家出的是:" + palyer)
print("你赢了") print("电脑出的是:" + computer)
elif palyer == "布" and computer == "石头": if palyer in list:
print("你赢了") if palyer == computer:
print("平局了")
elif palyer == "石头" and computer == "剪刀":
print("很恭喜,你赢了")
elif palyer == "剪刀" and computer == "布":
print("很恭喜,你赢了")
elif palyer == "布" and computer == "石头":
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