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
Antonio Velardo
Courses Plus Student 111 Pointsinput string don't work please help
i wanted to try luberjack.py in my version when i put the file name it shook ask me "howler you?" but it does not where is my mistake what this cose?
Feeling = input ( "how are you ?" )
if Feeling == "Great" : print ("nice") else : print ("i am sorry")
2 Answers
Frederick Pearce
10,677 PointsLooks like it should work, though python is sensitive to spacing, so you may want to clean up the extra spaces to see if that was it. I ran the following script and got the desired behavior:
#!/usr/bin/env python3
Feeling = input("how are you?")
if Feeling == "Great":
print("nice")
else:
print("i am sorry")
Himanshu Singh
1,224 PointsThis code is absolutely fine. Check it once again, you might have entered a lowercase or uppercase input in console. Python is a case sensitive language.