Share your repls and programming experiences

← Back to all posts
How do i impove this?
VishvakKumar (0)

import turtle
import time

IF YOU USE THIS CODE, MAKE SURE TO GO ON CONSOLE FIRST, NOTHING WILL SHOW ON RESULT YET.

print("When you input your answer, click on the 'result' tab on repl.it")
time.sleep(2)
answer = input("Choose a shape, triangle, circle, square. (lowercase) > ")
if answer == "triangle":
turtle.speed(10)
turtle.shape("turtle")
turtle.color("blue")
turtle.pensize(1)
for i in range(3):
turtle.forward(200+i*10)
turtle.left(120)

if answer == "circle":
turtle.speed(10)
turtle.shape("turtle")
turtle.color("blue")
turtle.pensize(1)
turtle.circle(50)

if answer == "square":
turtle.speed(10)
turtle.shape("turtle")
turtle.color("blue")
turtle.pensize(1)
turtle.forward(50)
turtle.left(90)
turtle.forward(50)
turtle.left(90)
turtle.forward(50)
turtle.left(90)
turtle.forward(50)
turtle.left(90)

print("Thank you for using my code !")