Commit ded95914 by BellCodeEditor

save project

parent 6aa47a46
Showing with 13 additions and 4 deletions
import random import random
One=input("玩家出拳(石头/剪刀/布)") while True:
print("玩家出拳:"+one) one=input("玩家出拳(石头/剪刀/布)")
two=["剪刀","石头","布"] print("玩家出拳:"+one)
three=random.choice(two) two=["剪刀","石头","布"]
three=random.choice(two)
print("电脑出拳:"+three)
if one==three:
print("平局")
elif (one=="石头" and three=="剪刀") or (one=="剪刀" and three=="布") or (one=="布") and three=="石头":
print("你赢了")
else:
print("你输了")
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