I am a beginner in pyhton I am working in turtle I must do a program to ask the user what figure wants to draw and make that figure importing turtle, until now I have defined the figures for the answers but how do I do it so that when the user puts the name of the defined figure is printed example:
"which figure wants to draw" t (or triangle)
(here the figure)
This is the code I have:
import turtle
input("que figura quiere dibujar")
def cuadrado():
turtle.pen()
turtle.forward(100)
turtle.left(90)
turtle.forward(100)
turtle.left(90)
turtle.forward(100)
turtle.left(90)
turtle.forward(100)
def triangulo():
turtle.pen()
turtle.forward(100)
turtle.left(120)
turtle.forward(100)
turtle.left(120)
turtle.forward(100)