Python Python Basics Meet Python Using Input

Prompt the user "What is your favorite color? ". Store the result in a variable named favorite_color

What am i doing wrong?

using_input.py
input(favorite_color)
print('What is your favorite color?', 'favorite_color')

3 Answers

frozenaught
frozenaught
4,745 Points

Hello @Luis Barahona, input() will allow to to prompt a question to the user and then return the answer as a string that you can in-turn assign as a variable. So to create a variable with the input you could just assign the variable with it, something like: my_fruit = input("what is your favorite fruit? ") so when the user inputs an answer, the answer will be assigned to the variable "my_fruit" in this case. Hopefully this will give you enough guidance to help you solve this one.

Hey Luis! The instructions say:

Prompt the user "What is your favorite color? ". Store the result in a variable named favorite_color, we'll use it in the next task.

Does that clear up your problem? Good Luck! Let me know if you need more help. :)

Thank you @speeddemon, much appreciate it. I was stuck!

frozenaught
frozenaught
4,745 Points

happy to help, you got this :)