Tag:turtle

  • Python: a detailed explanation of the example of vortex color control

    Time:2020-7-13

    turtle.pencolor(* args ) Returns or sets pencolor. Four input formats are allowed: pencolor() Returns the current pencolor as a color specification string or tuple (see example). Can be used as another input color of pencolor / fillcolor. pencolor(colorstring) Set pencolor to colorstring, which is a string specified by the color of TK, such as “red”, […]

  • Python twist Drawing Library & drawing name example

    Time:2020-7-7

    *****Take a look at the change() and run() functions I defined****** Drawing coordinate system: Function: set the size and position of the main form turtle.setup(width, height, startx, starty) #Width: the width of the window. If the value is an integer, it means the pixel value; if it is a decimal, it means the ratio of […]

  • Use Python twist to draw Gao Da

    Time:2020-7-4

    I will not say much nonsense, directly on the code! import turtle t=turtle.Turtle() turtle.Turtle().screen.delay(0) tleft=turtle.Turtle() #Part one t.penup() t.goto(0,0) t.pendown() t.left(20) t.forward(110) t.left(25) t.forward(40) t.left(100) t.circle(180,20) t.right(120) t.forward(250) t.left(165) t.forward(250) t.right(100) t.forward(35) t.left(70) t.forward(45) t.left(70) t.forward(120) t.left(70) t.forward(80) t.left(80) t.forward(80) t.left(68) t.forward(120) t.left(180) t.forward(78) t.right(68) t.forward(60) t.right(75) t.forward(60) t.right(110) t.forward(15) t.left(38) t.forward(65) t. The straight […]