Commit abb746ba by BellCodeEditor

save project

parent 443920d3
Showing with 4 additions and 10 deletions
import random import random
# 玩家出拳 # 玩家出拳
player=input("奥力给,干了兄弟们!:") player=input("机器人:奥力给,干了兄弟们!:")
print("我:我出"+player) print("奥力给"+player)
#机器人出拳 #机器人出拳
robot=["石头""剪刀","布"] robot=["石头""剪刀","布"]
player2=random.choice(robot) player2=random.choice(robot)
print("机器人:去死!"+player2+"吧") print("机器人说:去死吧!"+player2)
if player==player2: \ No newline at end of file
print("机器人:平局")
elif (player=="布" and player2=="石头") or (player=="石头" and player2=="剪刀")or (player=="剪刀" and player2=="布")
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