Write a function named
fatLine()
. The functionfatLine()
takes three parameters:
- a turtle,
t
- an integer,
segments
, that is the number of segments in the line that is drawn- an integer,
increment
, that is how much wider each successive segment of the line isThe function
fatLine()
should use the turtle t to draw a line composed of connected segments. Each segment should be of length 50. The width of the first line segment should be (the parameter)increment
, and each successive segment should be wider than the preceding segment byincremen
t. For example, ifsegments = 5
andincrement = 10
, the following is correct output
我试着用三个参数来编写这个代码,但我不确定如何才能运行它。任何帮助都很好谢谢。 我正试图将此代码编码为idle,但我没有运气。请帮助您了解如何执行。在
既然已经过去五年了,这个问题,尽管没有显示出编码的努力,但它应该有一个答案:
相关问题 更多 >
编程相关推荐