Commit 56125721 by BellCodeEditor

save project

parent b6da3269
Showing with 8 additions and 22 deletions
import
\ No newline at end of file
import turtle
# pen=turtle.Pen()
# pen.write("若以,tur真好用,\n我会在画布 上写字!",font=("Time",20,"normal"))
# pen.hideturtle()
# turtle.done()
import random
onr = input("玩家请出拳(剪刀/石头/布)? ")
list=["石头","剪刀","布"]
to=random.choice(list)
print("玩家出拳 "+onr)
print("计算机出拳 "+to)
if onr in list:
if onr==to:
print("平局")
elif onr=="石头"and"剪刀"==to:
print("玩家胜出")
elif onr=="剪刀"and"布"==to:
print("玩家胜出")
elif onr=="布"and"石头"==to:
print("玩家胜出")
else:
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