Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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?

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


input(favorite_color)
print("the colour", favorite_color, "is a great colour")
Rohald van Merode
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Rohald van Merode
Treehouse Staff

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.

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?  ")

#input(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
229,786 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.