Commit 58edc172 by BellCodeEditor

save project

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