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 (Retired) Putting the "Fun" Back in "Function" Shopping List Redux

Is there a copy of the code he writes to start with (before iterating).

He writes some code which matches that of the last lesson. I think it might be useful if I can run this code to practice but I can't find a copy of it anywhere written down for me to cut and paste? Thanks

2 Answers

You can launch a new Workspace, and then base it off a template of a previous video's Workspace by following these steps:

  1. Click 'Launch Workspace'
  2. Click 'Launch Different Workspace'
  3. Click 'Create New Workspace'
  4. Name your new Workspace whatever you want so that you can find it again (maybe the name of the current video)
  5. Pick 'Python' as the environment
  6. Use the last dropdown and under Content Templates find the one for the previous video (or maybe the current one, you'll have to try both and compare the code to see which has what you're looking for)
  7. Click 'Launch it!'

You can also download a copy of the Workspace once you've got the code you need, if you wanted to try run it on your local machine (there's a course on Setting Up a Local Python Environment.

Thanks Ian. Your steps are very useful. However it does not work. If I follow your steps I just get a new workspace with a welcome screen: nothing with pre-existing code (see below) Thanks! PF

Welcome to Workspaces!


Workspaces was designed to allow Treehouse Students to build and learn side by side with Treehouse content.

How to Use Workspaces


To create your first file, go to the 'File' menu and select 'New File.' Name the file index.html. Happy building!

We Want to Hear From You


Your feedback is important to us. If you have anything you want to share, good or bad, you can send an email to help@teamtreehouse.com.

Well that sucks... I guess they haven't set up the templates, or it is assumed you're coding along throughout the entire course (which I'd recommend anyways).

Here's a Snapshot of the new Workspace I set up which has just the shopping_list.py file as it appears at the start of this video.

http://w.trhou.se/cg02w3f7qe

You should be able to 'fork' it (create a copy for yourself) and then go from there. The fork icon/button is up in the top right near the preview button.

Jeffrey Ruder
Jeffrey Ruder
6,408 Points

You can view the code again by re-watching the video, but you probably already knew that.

In general, you will learn more if you type the code yourself instead of copy/pasting.

Thanks for replying to this Jeff. I'm quite touched by the support of this community! I'm glad that re-writing code helps for you. It doesn't help for me: hence my question. Interestingly there isn't enough pedagogical evidence that it works at all: so I guess for now it's "each to their own!".