Boston Python Workshop 8/Friday: Difference between revisions

From OpenHatch wiki
Content added Content deleted
imported>Jesstess
No edit summary
imported>Jesstess
 
(18 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Welcome to the Friday evening section of the Boston Python Workshop!
Welcome to the Friday evening section of the Boston Python Workshop!


When you get to MIT, please do the following things:
When you get to MIT, please start your laptop and get on the wireless network. Join the network called "MIT", not "MIT GUEST". Then work through the goals on this page in order; they should take between 2 and 3 hours. Lots of staff will be around to help troubleshoot and to answer questions -- don't hesitate to ask!


<ol>
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.
<li>Start your laptop and get on the wireless network. Join the network called "MIT", not "MIT GUEST".</li>
<li>Work through the goals on this page in order; they should take between 2 and 3 hours. Lots of staff will be around to help troubleshoot and to answer questions -- don't hesitate to ask!</li>
<li>When you've finished all of the goal, raise your hand and a helper will come over and go through a checklist with you to make sure you're all set for tomorrow.</li>
</ol>

<b>Please be sure to do the checkoff before you leave</b> -- it'll make sure that you are in good shape for tomorrow.


== Goal #1: set up Python ==
== Goal #1: set up Python ==


(Estimated time: 5 minutes)
This section has instructions for installing Python and running Python from a command prompt.

First things first: we need to install Python! Please complete the instructions below for your operating system.


* [[Boston Python Workshop 8/Friday/Windows set up Python|Windows]]
* [[Boston Python Workshop 8/Friday/Windows set up Python|Windows]]
Line 14: Line 22:


== Goal #2: prepare a text editor ==
== Goal #2: prepare a text editor ==

(Estimated time: 5 minutes)


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.<br />
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.<br />
Line 24: Line 34:


== Goal #3: practice starting and exiting Python ==
== Goal #3: practice starting and exiting Python ==

(Estimated time: 5 minutes)


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). So let's 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). So let's practice starting and exiting Python:
Line 31: Line 43:
* [[Boston Python Workshop 8/Friday/Linux interactive Python|Linux]]
* [[Boston Python Workshop 8/Friday/Linux interactive Python|Linux]]


== Goal #4: practice navigating the computer from a command prompt ==
== Goal #4: practice navigating the computer from a terminal ==


(Estimated time: 10 - 15 minutes)
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.

Throughout this workshop, we'll be running Python programs from the terminal, which means we'll want to be comfortable with navigating to those programs from the terminal prompt. In this section, we'll practice using these navigation commands.


* [[Boston Python Workshop 8/Friday/Windows terminal navigation|Windows]]
* [[Boston Python Workshop 8/Friday/Windows terminal navigation|Windows]]
Line 40: Line 54:


== Goal #5: practice running Python code from a file ==
== Goal #5: practice running Python code from a file ==

(Estimated time: 5 minutes)


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 execute the contents of that file (aka a Python script). In this section, we'll practice running Python scripts.
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 execute the contents of that file (aka a Python script). In this section, we'll practice running Python scripts.
Line 47: Line 63:
* [[Boston Python Workshop 8/Friday/Linux Python scripts|Linux]]
* [[Boston Python Workshop 8/Friday/Linux Python scripts|Linux]]


== Goal #6: get dependencies installed for the Saturday projects ==
== Goal #6: download the Saturday projects ==

(Estimated time: 10 minutes)


* [[Boston Python Workshop 8/Friday/Windows project dependencies|Windows]]
* [[Boston Python Workshop 8/Friday/Windows project dependencies|Windows]]
Line 54: Line 72:


== Goal #7: start learning Python! ==
== Goal #7: start learning Python! ==

(Estimated time: 60 - 90 minutes)


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.
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.




<div style="font-size:125%">[[Boston Python Workshop 8/Friday/Tutorial| &raquo; Click here to work through tonight's tutorial &laquo;]]</div>
<div style="font-size:125%">[[Boston Python Workshop 8/Friday/Tutorial| &raquo; Click here and work through tonight's tutorial &laquo;]]</div>
<br />
<br />


== Goal #8: practice Python using Codecademy ==
== Goal #8: practice Python using Codecademy ==


(Estimated time: 30 - 60 minutes)
The big goal of this practice section is to get you thinking about how to solve problems in Python.

It's time to use what we've learned in the tutorial and get some practice thinking about and solving problems in Python.

To give you this practice, we've created custom online practice problems just for this class, using a site called Codecademy!

Tonight, please visit the link below and complete the <b>8 practice problems in the "Strings and choices" section</b>.


<br />
<br />
<div style="font-size:125%">[[Boston Python Workshop 8/Friday/CodingBat Using Codingbat|&raquo; Click here to work through tonight's CodingBat questions &laquo;]]</div>
<div style="font-size:125%">[http://www.codecademy.com/courses/python-beginner-en-kSQwt &raquo; Click here and complete tonight's Codecademy exercises &laquo;]</div>




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.
You don't have to create a Codecademy 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 #9: Checkoff ==
== Goal #9: Checkoff ==
Line 77: Line 103:
<ol>
<ol>
<li>
<li>
Start a command prompt, and from that command prompt start Python. Then quit Python.
Start a terminal prompt, and from that prompt start Python. Then quit Python.
</li>
</li>
<li>
<li>
Line 83: Line 109:


<pre>
<pre>
print "Hello World"
print("Hello World")
</pre>
</pre>


and save the file. From a command prompt, navigate to and execute that Python script.
and save the file. From a terminal prompt, navigate to and execute that Python script.
</li>
</li>
<li>
<li>
Line 105: Line 131:
</pre>
</pre>
</li>
</li>
<li>To test the Twitter installlation, navigate to the Twitter directory and run <code>twitter_api.py</code>:

<pre>
python twitter_api.py --search=python
</pre>
</li>

<li>
<li>
Walk through the Tutorial concept that was most confusing for you. The Tutorial is [[Boston_Python_Workshop_7/Friday/Tutorial| here]].
Walk through the Tutorial concept that was most confusing for you. The Tutorial is [[Boston_Python_Workshop_8/Friday/Tutorial| here]].
</li>
</li>


<li>
<li>
Walk through the CodingBat problem that you had the most difficulty with. The Friday CodingBat questions are [http://codingbat.com/home/bostonpythonworkshop@gmail.com/Friday here].
Walk through the Codecademy problem that you had the most difficulty with. The Friday Codecademy questions are [http://www.codecademy.com/courses/python-beginner-en-kSQwt here].
</li>
</li>
</ol>
</ol>


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


==Congratulations!==
==Congratulations!==


You are done with the Friday portion of this Workshop. We'll see you at 9:45am tomorrow back here in the basement of the Stata Center! Please bring the laptop you used tonight.
You are done with the Friday portion of this Workshop. We'll see you at <b>9:45am</b> tomorrow back here in the basement of the Stata Center! Please bring the laptop you used tonight.

We'll have coffee and snacks tomorrow morning. <b>DO NOT BE LATE</b>: you don't want to miss the beginning of the interactive lecture!


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

[[File:Champagne.png|100px]][[File:Party.png|125px]]


[[Boston Python Workshop 8|&laquo; Back to the Workshop home page]]
[[Boston Python Workshop 8|&laquo; Back to the Workshop home page]]

Latest revision as of 23:53, 14 July 2013

Welcome to the Friday evening section of the Boston Python Workshop!

When you get to MIT, please do the following things:

  1. Start your laptop and get on the wireless network. Join the network called "MIT", not "MIT GUEST".
  2. Work through the goals on this page in order; they should take between 2 and 3 hours. Lots of staff will be around to help troubleshoot and to answer questions -- don't hesitate to ask!
  3. When you've finished all of the goal, raise your hand and a helper will come over and go through a checklist with you to make sure you're all set for tomorrow.

Please be sure to do the checkoff before you leave -- it'll make sure that you are in good shape for tomorrow.

Goal #1: set up Python

(Estimated time: 5 minutes)

First things first: we need to install Python! Please complete the instructions below for your operating system.

Goal #2: prepare a text editor

(Estimated time: 5 minutes)

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

(Estimated time: 5 minutes)

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). So let's practice starting and exiting Python:

Goal #4: practice navigating the computer from a terminal

(Estimated time: 10 - 15 minutes)

Throughout this workshop, we'll be running Python programs from the terminal, which means we'll want to be comfortable with navigating to those programs from the terminal prompt. In this section, we'll practice using these navigation commands.

Goal #5: practice running Python code from a file

(Estimated time: 5 minutes)

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 execute the contents of that file (aka a Python script). In this section, we'll practice running Python scripts.

Goal #6: download the Saturday projects

(Estimated time: 10 minutes)

Goal #7: start learning Python!

(Estimated time: 60 - 90 minutes)

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.



Goal #8: practice Python using Codecademy

(Estimated time: 30 - 60 minutes)

It's time to use what we've learned in the tutorial and get some practice thinking about and solving problems in Python.

To give you this practice, we've created custom online practice problems just for this class, using a site called Codecademy!

Tonight, please visit the link below and complete the 8 practice problems in the "Strings and choices" section.



You don't have to create a Codecademy 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 #9: 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 terminal prompt, and from that 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 terminal prompt, navigate to and execute that Python script.

  3. 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.
  4. To test the ColorWall installation: navigate to the ColorWall directory and run run.py:
    python run.py -a
    
  5. To test the Wordplay installation: navigate to the Wordplay directory and run words1.py:
    python words1.py
    
  6. Walk through the Tutorial concept that was most confusing for you. The Tutorial is here.
  7. Walk through the Codecademy problem that you had the most difficulty with. The Friday Codecademy questions are here.

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

Congratulations!

You are done with the Friday portion of this Workshop. We'll see you at 9:45am tomorrow back here in the basement of the Stata Center! Please bring the laptop you used tonight.

We'll have coffee and snacks tomorrow morning. DO NOT BE LATE: you don't want to miss the beginning of the interactive lecture!

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

« Back to the Workshop home page