Commit bb503502 by BellCodeEditor

save project

parent 4b34bbea
Showing with 9 additions and 5 deletions
......@@ -4,13 +4,16 @@ import random
list=["石头","剪刀","布"]
computer=random.choice(list)
print("computer'choice:"+computer)
if choice==computer :
if choice in list:
if choice==computer :
print("draw")
elif choice=="剪刀" and computer=="布" :
elif choice=="剪刀" and computer=="布" :
print("computer lose")
elif choice=="石头" and computer=="剪刀" :
elif choice=="石头" and computer=="剪刀" :
print("computer lose")
elif choice=="布" and computer=="石头" :
elif choice=="布" and computer=="石头" :
print("computer lose")
else:
else:
print("player lose")
else:
print("Please enter: rock, scissors or paper!")
\ 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