Commit 3fbf5b43 by BellCodeEditor

save project

parent 23dfff73
Showing with 31 additions and 0 deletions
import random
# 玩家出拳
p=input("玩家出拳(石头/剪刀/布)")
print("玩家出拳:"+p)
#计算机出拳
list=["石头","剪刀","布"]
compurter=random.choice(list)
print("计算机出的是:"+compurter)
if p==compurter:
print("平局")
elif p=="石头"and compurter=="剪刀":
print("恭喜玩家赢")
elif p =="剪刀" and compurter=="布":
print("恭喜玩家赢")
elif p =="布" and compurter=="石头":
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