Talking to Your Program ๐ค
So far your programs only talk at you. Time to talk back!
input() asks a question, waits for someone to type an answer, and hands
you whatever they typed:
color = input("What's your favorite color? ")
print(f"Ooh, {color} is a great choice!")
When you run this, the program pauses and waits for you to type in the console. Try it!
Your mission
- Use
input()to ask for someone's name and store it in a variable - Use
input()again to ask for their favorite hobby - Print a friendly sentence that uses both answers
Your code
Press โถ Run to see what your code does!