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 Functional Python The Lambda Lambada Lambda

Callum Anderson
seal-mask
.a{fill-rule:evenodd;}techdegree
Callum Anderson
Data Analysis Techdegree Student 10,200 Points

when running the 'stock.py' through the console. No action occurs

Snapshot Below it's Stock.py In the shell when trying to run the file with the obvious 'python filename.py' it just creates a new line instead of running the file. I'm sure spelling is correct and even in the file itself but I'm having trouble figuring out a solution. I've left a snapshot of the workspace which I've followed throughout the video and just to explain further what I mean about the shell too.

https://w.trhou.se/4bsc8u706o

Shell: treehouse:~/workspace$ python stock.py treehouse:~/workspace$

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there, Callum Anderson! There are actions that are occurring but there is nothing in that file that causes anything to display. All the print statements are commented out. Below your final line in stock.py try print(total). This will print out the total of the prices of the books :smiley: