Commit c7ccd9b4 by BellCodeEditor

save project

parent 55e51c9b
Showing with 13 additions and 15 deletions
def xx(): # 上节课你是这样绘制的五角星:
total = [] # 这节课你可以利用新学的知识自定义五角星的颜色么?
while True: import turtle
unit= input("请输入:") ink = input("什么色?")#绘制五角星#
if unit== 'q': pen = turtle.Pen()
break pen.fillcolor(ink)
else: pen.begin_fill()
total.append(unit) for i in range(5): #重复执行5次
print(total) pen.forward(200) #向前移动200步
a=xx() pen.right(144) #向右移动144度,注意这里的参数一定不能变
sum=0 pen.end_fill() #结束填充红色
for i in a: turtle.done()
sum=sum+1 \ No newline at end of file
print("消费"+str(sum)+"元""扫码还是现金")
\ 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