Commit 727bcd50 by BellCodeEditor

save project

parent 3bd59894
Showing with 11 additions and 12 deletions
# 上节课你是这样绘制的五角星👇: bro1="关羽"
# 这节课你可以利用新学的知识自定义五角星的颜色么? bro2="刘备"
import turtle bro3="张飞"
ink = input("什么色?")#绘制五角星# bros=["刘备","关羽","张飞"]
pen = turtle.Pen() bro1=["关羽",160,8.5]
pen.fillcolor(ink) bro2=["刘备",161,9.1]
pen.begin_fill() bro3=["张飞",166,8.3]
for i in range(5): #重复执行5次 bros[0]="关羽"
pen.forward(200) #向前移动200步 bros[1]="刘备"
pen.right(144) #向右移动144度,注意这里的参数一定不能变 print(bros)
pen.end_fill() #结束填充红色 \ No newline at end of file
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