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 trialJason Simpson
253 PointsTrying to run script in console results in nothing
name = input("What is your name? ")
if name == "Jason":
print(name + "is a lumberjack and he is OK!")
else:
print(name + "sleeps all night and" + name + "Works all day!")
When I go to my console and type in python lumberjack.py
it gives me the treehouse:~/workspace$ and will not run the script at all. No errors.
1 Answer
Charles Lee
17,825 PointsTwo main things to check/try.
- Make sure you've saved the code. If there is a red/orange colored dot next to the tab title, the work was not saved.
- Try refreshing the workspace and try again.
I've tried it in my workspace and it seems to work well.
Future help:
If you ever want to format your code here you can prefix the code part with three backticks (`) followed by python. Then end with another three backticks. Like so but without the quotes:
"```python"
Code goes here
"```"