Sunday, August 9, 2020

Draw Line

https://slideplayer.com/slide/3268443/

https://stackoverflow.com/questions/59818617/why-is-turtle-not-drawing-in-python-3-in-line-class


https://code.sololearn.com/ctB1aNUv0aIz/#py


import turtle
turtle.setup(500,500) # Config turtle settings
turtle.setworldcoordinates(-250,-250,250,250) # Config turtle settings
critter = turtle.Turtle()
def draw_line(t, x1, y1, x2, y2):
    t.penup()
    t.goto(x1, y1)
    t.pendown()
    t.goto(x2, y2)
draw_line(critter, -100, -100, 100, 100)
draw_line(critter, -100, 100, 100, -100)

No comments:

Post a Comment

Introduction to Keras and TensorFlow for Training Deep Learning Classifiers

 ### Introduction to Keras and TensorFlow for Training Deep Learning Classifiers **Keras and TensorFlow** are powerful tools in the realm of...