[python]代码库
import turtle
import tkinter.messagebox
root = tkinter.Tk()
root.withdraw()
Love_exercise = input("请问您喜欢奥运会吗?(填:喜欢/不喜欢):")
if Love_exercise == '喜欢':
turtle.penup()
turtle.goto(-100,0)
turtle.pendown()
turtle.color("blue")
turtle.circle(70)
turtle.penup()
turtle.forward(150)
turtle.pendown()
turtle.color("black")
turtle.circle(70)
turtle.penup()
turtle.forward(150)
turtle.pendown()
turtle.color("red")
turtle.circle(70)
turtle.right(200)
turtle.penup()
turtle.forward(210)
turtle.pendown()
turtle.color("yellow")
turtle.circle(70)
turtle.left(150)
turtle.penup()
turtle.forward(130)
turtle.pendown()
turtle.color("green")
turtle.circle(70)
tkinter.messagebox.showwarning(title="成功",message="奥运五环绘制成功 !")
else:
tkinter.messagebox.showerror(title="错误的选择",message="不喜欢奥运你看什么奥运五环!")
[源代码打包下载]
初级程序员
by: 云代码会员 发表于:2021-08-03 23:25:12 顶(4) | 踩(1) 回复
抢个沙发
回复评论