Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This gist is fun with python module named as turtle
import turtle
t = turtle.Turtle()
def my_turtle(t, sprint_range, spd):
t.speed(spd)
t.color("red")
for i in range(sprint_range):
t.forward(i)
t.left(i)
sprint_input = input("Enter the nmber of rounds you want: ")
speed = input("Enter the value for speed from 1 to 10: ")
if(speed > 10):
print("Invalid speed input detected")
exit()
else:
my_turtle(t, sprint_input, speed)
turtle.done()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment