Commit d3898777 by BellCodeEditor

save project

parent e2b8640e
Showing with 21 additions and 0 deletions
# 玩家出拳
import random
a = input("玩家出拳:(剪刀,石头,布)")
print("你出的:"+a)
ddd = ["剪刀" , "石头" , "布"]
d = random.choice(ddd)
print("电脑:"+d)
if a == d:
print("平局")
elif a == "剪刀" and d == "布":
print ("电脑win")
elif a == "剪刀" and d == "石头":
print("compurter win")
elif a == "石头" and d == "布" :
print ("compurter win")
elif a == "石头" and d == "剪刀":
print ("player win")
elif a == "布" and d == "剪刀" :
print ("compurter win")
else:
print("player win")
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