Python Python Basics Meet Python Using Input

input "favorite color"?

using_input.py

Blue DiamondXD
Blue DiamondXD
5,369 Points

at least try solving it i know you can do it if not send me the code to fix it

Blue DiamondXD
Blue DiamondXD
5,369 Points

heres a hint : use the variable to make it ask whats your favorite color (input is required )

1 Answer

Ryan McGuire
Ryan McGuire
3,754 Points

Reading the question, you can guess they want you to create a "variable" named favorite_color. In one line you can set this equal to what the person at the computer types using the "input" function. The variable name could be anything you want that isn't already used. Like "favColor" because it's shorter, but following their suggestion for these questions is best. The input function will display the message below in quotes and then save whatever the person types as the response. The code should look like this.

favorite_color=input("What is your favorite color?")