Commit 5472d94d by BellCodeEditor

save project

parent b52a1d05
Showing with 7 additions and 16 deletions
import random import turtle
p=input("请出拳(石头/剪刀/布):") pen=turtle.Pen()
list=["石头","剪刀","布"] pen.write(" 墨 梅\n 宋 王冕\n我家洗砚池头树,\n朵朵花开淡墨痕。\n不要人夸好颜色,\n只留清气满乾坤。",font=("Times", 20, "normal"))
a=random.choice(list) pen.hideturtle()
print("玩家出拳:"+p) turtle.done()
print("计算机出拳:"+a)
if p in list: \ No newline at end of file
if p==a:
print("平局")
elif (p=="石头" and a=="剪刀") or (p=="剪刀" and a=="布") or (p=="布" and a=="石头"):
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