Commit 4107d1d1 by BellCodeEditor

save project

parent 3151558f
Showing with 9 additions and 8 deletions
# 玩家出拳
import random
player=input()
print("玩家出拳:",player)
p=input()
print("玩家出拳:",p)
list1=["石头","剪刀","布"]
computer=random.choice(list1)
print("电脑出拳:",computer)
if player==computer:
c=random.choice(list1)
print("电脑出拳:",c)
if p==c:
print("平局")
elif player=="石头" and computer=="剪刀":
elif p=="石头" and c=="剪刀":
print("you win!")
elif player=="剪刀" and computer=="布":
elif p=="剪刀" and c=="布":
print("you win!")
elif player=="布" and computer=="石头":
elif p=="布" and c=="石头":
print("you win!")
else:
print("you lose!")
\ 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