Commit c26bf828 by BellCodeEditor

save project

parent 9f1f633b
Showing with 13 additions and 3 deletions
import random import random
player=input("请出拳(石头/剪刀/布):") player=input("请出拳(石头/剪刀/布):")
print("玩家出拳"+player) print("玩家出拳"+player)
tmd=['石头','剪刀','布'] tmd=['石头','剪刀','布']
sb=random.choice(tmd) sb=random.choice(tmd)
print("计算机出拳:"+sb) print("计算机出拳:"+sb)
\ No newline at end of file if sb==tmd:
print("平局")
elif sb=="石头"and tmd=="剪刀":
print("玩家胜")
elif sb=="剪刀"and tmd=="布":
print("玩家胜")
elif sb=="布"and tmd=="石头":
print("玩家胜")
else :
print("玩家输")
\ 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