Commit 67c48101 by BellCodeEditor

save project

parent ac208326
Showing with 15 additions and 2 deletions
import random
player=input("请出拳:(石头/剪刀/布)")# 玩家出拳 player=input("请出拳:(石头/剪刀/布)")# 玩家出拳
print("玩家出拳:"+player) print("玩家出拳:"+player)
\ No newline at end of file
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("玩家输")
\ 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