Commit 570c9bca by BellCodeEditor

save project

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