Commit 727d49ea by BellCodeEditor

auto save

parent 29eb9a64
Showing with 22 additions and 13 deletions
fruit = {'watermelon':1,'apple':5} import turtle
k = input('today fruit name:') s = turtle.Screen()
v = int(input(' input '+k+ ' price: ')) a = s.textinput("标题","大小")
if k in fruit: a = int(a)
if v < fruit[k] : color =s.textinput("标题","画笔颜色(写英语颜色):")
fruit[k] = v color2 = s.textinput("标题","填充颜色(写英语颜色):")
print('the price was new') size = s.textinput('标题','字体大小(写数字):')
else : pen = turtle.Pen()
print('the price not had change') pen.pencolor(color)
else : pen.fillcolor(color2)
fruit[k] = v pen.begin_fill()
print('had new thing and price') pen.left(45)
pen.forward(2*a)
pen.circle(a,180)
pen.right(90)
pen.circle(a,180)
pen.forward(a*2)
pen.end_fill()
pen.penup()
pen.goto(-75,-75)
pen.write('2333',font = ('Times',int(size),'normal'))
turtle.done()
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