Commit bcdf355d by BellCodeEditor

save project

parent 7beeed3b
Showing with 9 additions and 2 deletions
import random
play=input("请出拳(石头/剪刀/布)")
print("玩家"+play)
list["石头","剪刀","布"]
list["石头""剪刀""布"]
com=random.choice(list)
print("电脑"+com)
if play==com:
print("平局")
elif play == "石头"and com=="剪刀"
elif play == "石头"and com=="剪刀"
print("玩家赢了")
elif play == "剪刀"and com=="布":
print("玩家赢")
elif play == "布"and com =="石头"
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