Answers for "python clean turtle"

1

how to delete a turtle in python

#To hide the turtle, use this:
turtle.hideturtle() #"turtle" can be replaced with your turtle's name

#To delete one that is saved in a variable, use this:
yourTurtleName = 0 #Give your turtle value any value exept turtle.Turtle(), and the turtle is dead

#To remove everything a turtle has written, use this:
turtle.clear()
Posted by: Guest on October-19-2021
0

reset a turtle python

import turtle
t = turtle.Turtle()

#A Drawing
t.lt(50)
t.fd(100)

#Resets the turtles rotation, position, and drawings
t.reset()

######################################################
# The reset() function doesn't require any arguments #
######################################################
Posted by: Guest on September-13-2021

Python Answers by Framework

Browse Popular Code Answers by Language