Python Python Basics Meet Python Using Input

Input command works on my system but not on this system and i cannot progress

I have tried this code in visual studio and it works fine. am i missing something?
favorite_color=input("What is your favorite color?  ")

print("the colour", favorite_color, "is a great colour")
Rohald van Merode
Rohald van Merode
7,229 Points

Hi quappi,

You've already assigned the variable favorite_color to the input of the user with the first line. Delete the second line and your code should work.

Thomas Wilhelm
Thomas Wilhelm
3,714 Points

Hello! I just copied and pasted your code into a workspace, and I commented out the second line. Once I ran it and entered "Red" I received the output:

the colour Red is a great colour

My code below:

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


print("the colour", favorite_color, "is a great colour")

Your code worked for me as is, it just had an extra input field that didn't do anything.

2 Answers

Steven Parker
Steven Parker
182,341 Points

As previously pointed out, the second "input" is not part of the instructions ans should be removed.

thanks for the help, i feel like an idiot. sorry about the obvious question.