The homework for the Python and Princeton meeting!

Hi Techsters members,

Greg, has personalised an assignment for you! This assignment will help you retain the Python information that was taught to you on Wednesday! It will be a hands on activity as demonstrated in our session on Wednesday!  (A recap of Wednesday’s meeting is below the hw)

The homework will be due next Wednesday! [Wednesday, January 28th, 2015]


1. Download Sublime Text 2 or Notepad++

2. Download and install Python, following the instructions here:

3. Do everything that we did in class (addition, defining variables, importing math, calculating the area of a circle)

4. Calculate the area of a square, a rectangle, and a triangle using variables (hint: you should have one variable for the square and two each for the rectangle and triangle)


Extras to be extra ready for the next time Greg comes:

1. Using the quadratic formula, calculate the roots of the polynomial x^2 – x – 1=0 [This should be equal to the Golden Ratio.]

3. Look into other command line commands, following the instructions here:, if you delete something using the command line, you can’t get it back – be careful)


Here’s a recap of what we did on Wednesday’s lesson:

1. Demo of cool things to do with Python: Text message app using the Twilio API (see this comment for more information about what an API is)

2. Introduction to the command line: cd (change directory) to move around, dir to list the contents of the current folder, mkdir to make a folder

3. Downloading Python

4. Running Python from the command prompt: type “python”; you should see three right arrows >>>

5. Import statements to bring in extra functions: import math

6. Assigning variables: r = 5

7. Doing math with Python: A = math.pi*r**2

Happy tinkering!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s