The first figure is required, however, the second picture is my generation will appear the wrong
CodePudding user response:
Why SQL plate has a python, and the middle of the tip in your code that from the turtle. The color (" pink ") why doesn't the indentation to the upper drawSnake methodCodePudding user response:
The import turtleDef drawSnake (rad, Angle, len, neckrad) :
Mycolor=[" black ", "red", "red", "blue", "yellow"]
Yocolor="yellow", "green", "yellow", "red", "red"]
For I in range (len) :
Turtle. Pencolor (mycolor [I])
Turtle. Circle (rad, Angle)
Turtle. Pencolor (yocolor [I])
Turtle. Circle (- rad, Angle)
Turtle. Pencolor (" green ")
Turtle. Circle (rad, Angle/2)
Turtle. Pencolor (" yellow ")
Turtle. Fd (rad)
Turtle. Pencolor (" red ")
Turtle. Circle (neckrad + 1, 180)
Turtle. Pencolor (" green ")
Turtle. Fd (rad * 2/3)
Def the main () :
Turtle. Setup (1300, 800, 0, 0)
Pythonsize=30
Turtle. Pensize (pythonsize)
Turtle. Seth (40)
DrawSnake (40, 80, 5, pythonsize/2)
The main ()
CodePudding user response:
The