Commit 8562e4e7 by BellCodeEditor

save project

parent 895e9866
Showing with 205 additions and 2 deletions
import random
player=input("请出拳:(石头/剪刀/布)")# 玩家出拳
print("玩家出拳:"+player)
\ No newline at end of file
print("玩家出拳:"+player)
list=["石头""剪刀""布"]
robot=random.choice(list)
print("计算机出拳:"+robot)
if robot==player:
print("平局")
elif (robot=="布" and player=="剪刀") or (robot=="剪刀" and player=="石头") or (robot=="石头" and player=="布"):
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