Commit 62ec59d6 by BellCodeEditor

save project

parent 7e8afbb6
Showing with 17 additions and 6 deletions
import random
player=input("请出拳:石头/剪刀/布")# 玩家出拳
print("玩家出拳:"+player)
list=["石头","剪刀","布"]
robort=random.choice(list)
print("计算出拳:"+robort)
\ No newline at end of file
while True:
player=input("请出拳:石头/剪刀/布")# 玩家出拳
print("玩家出拳:"+player)
list=["石头","剪刀","布"]
robort=random.choice(list)
print("计算出拳:"+robort)
if player==robort:
print("平局")
elif player=="石头" and robort=="剪刀":
print("你赢了")
elif player=="剪刀" and robort=="布":
print("你赢了")
elif player=="布" and robort=="石头":
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