Skip to content

Python WorkShop Friday Setup

paulcollinsiii edited this page Oct 20, 2012 · 1 revision

Welcome to the Friday evening section of the San Diego Python Workshop! Lots of staff will be around to help troubleshoot and to answer questions -- don't hesitate to ask!

At the end, a staff member will go through a checklist with you to make sure you're all set for tomorrow. Please be sure to do this checkoff before you leave -- it'll make sure that you are in good shape for tomorrow.

Goal #1: Install Python

Installing Python and running Python from a command prompt.

Goal #2: Prepare a text editor

In addition to being able to run Python, we are going to install a good text editor for writing and saving Python code during the workshop.

If you would like to use a different text editor from the recommendation for your operating system, please let a staff member know.

Goal #3: Practice starting and exiting Python

We'll do a lot of learning and practicing at a Python prompt. This is "interactive" because you are typing the code and hitting enter to run it yourself, instead of running it from a file.:

Goal #4: Practice navigating the computer from a command prompt

We will be running files containing Python code (Python "scripts") from the command prompt. You'll need to be able to navigate to those scripts using the command prompt so you can run them. In this section, we'll practice using these navigation commands.

Goal #5: Practice running Python code from a file

Interactive Python programming at a Python prompt is great for short pieces of code and for testing ideas. For longer code it can be easier to save the code in a file and then execute the contents of that file (aka a Python script).

Goal #6: Start learning Python!

It's time to start learning, reading, and writing some Python! Tonight, you'll work through a self-directed tutorial. Saturday morning, we'll have an interactive lecture to cover more Python basics.

Friday Night Tutorial

Goal #7: Practice Python using CodingBat

Learning about functions opened up a whole new way for us to practice, using the programming site codingbat.com. The big goal of this section is to get you thinking about how to solve problems in Python.

Friday Night CodingBat

You don't have to create a CodingBat account to do the exercises, but if you do create an account it'll keep track of which problems you've completed and other statistics.

Goal #8: Checkoff

Tell a staff member that you are ready to be checked off. Together you will go through the following check-off steps:

  1. Start a command prompt, and from that command prompt start Python. Then quit Python.

  2. Create a new Python file (with a .py extension). In that file, type

print "Hello World"

and save the file. From a command prompt, navigate to and execute that Python script.

  1. Open your text editor, and press "Tab". Use the left arrow key to show the instructor that you are using spaces to indent, not tabs.

  2. Walk through the CodingBat problem that you had the most difficulty with. The Friday CodingBat questions are here.

If you have any other questions about the tutorial, project setup, or CodingBat questions, now is a great time to ask!

Congratulations!

You are done with the Friday portion of this Workshop. We'll see you tomorrow back here! Please bring the laptop you used tonight.

If you have any questions, comments, or feedback on tonight's material, don't hesitate to let a staff member know.

Thanks

Special thanks to the Boston Python User Group, from whom this wiki is very heavily based