'i want to use the turtle function to write out what i input

i have already made a turtle string to make every letter in the aphabet, and assigned them to functions, so i only have to print a() for it to write out an A for example. but what im wondering is if it is possible to have the user input a sentence or word, and then search through the input and find all letters used, then print those corresponding functions, to print out what is said in the input. i have no idea if this is even possible, but if it is i would like to know how. thank you in advance.



Solution 1:[1]

An easier way to do this is to use the turtle write function.

import turtle
my_text = input("type something: ")
turtle.write(my_text)
turtle.done()

turtle.done() is there to keep the turtle screen visible after it runs.

If you want to use a separate function for each letter you will need to split your input into letters and call the functions like was mentioned in the comments. This approach is called a dispatch table. Please edit your question to show what you have attempted so far.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 FractalLotus