Commit 4a636990 by BellCodeEditor

save project

parent 04e73b2b
Showing with 10 additions and 8 deletions
......@@ -4,16 +4,17 @@ player=input("你出啥??????????(石头/剪刀/布)")
print("你出:"+player)
list=["石头","剪刀","布"]
if player in list:
print("there is no such choice,please try again.")
comp=random.choice(list)
print("电脑出:"+comp)
if comp==player:
comp=random.choice(list)
print("电脑出:"+comp)
if comp==player:
print("平局")
elif comp=="石头" and player=="布":
elif comp=="石头" and player=="布":
print("win")
elif comp=="布" and player=="剪刀":
elif comp=="布" and player=="剪刀":
print("win")
elif comp=="剪刀" and player=="石头":
elif comp=="剪刀" and player=="石头":
print("win")
else:
else:
print("lose")
else:
print("there is no such choice,please try again.")
\ 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