Beginning Programming with Python

So, I’ve been teaching CS101 - Introduction to Computing this semester (Fall 2017). We picked Python as the language. I’ve compiled the videos and all the lecture notebooks. These are being made available in the hopes that they can be useful for someone. Here’s how to get started with these. 

Getting Started

First, download and install Anaconda distribution. We’ve used Python2.7 for this class due to several reasons. So, it’s highly recommended that you install Python2.7 version of Anaconda for your operating system from over here: https://www.anaconda.com/download/

(Once you’re done with the course, it should be easy to move to Python3 as well inshaallah).

Running Code

Once you’ve downloaded and installed Anaconda i.e. Python2.7, head over to our github repo or directly download the zip file, which contains all the needed resources. Unzip the file to get the whole folder.

Then, start with our video set over on Vimeo. Make sure you view the “Notebook Howto” video after Lecture 05. This will tell you exactly how to get started with code. (Videos prior to this are theoretical but are absolutely necessary for a thorough understanding of coding.)

Assignments

Since it’s absolutely necessary that you practice with some problems on your own, I’m also making the assignments set in the class publicly. You can see these assignments in the same zip file you extracted earlier.

To run the assignments, open Anaconda Prompt (or just the terminal if you’re on Linux or Mac) and issue the following command:

pip install pytest-timeout

This installs a package necessary for running our assignment tests.

Then, go to the directory of an assignment (take a look at “Autograder howto” video for details on this or post a question in comments below for help). Once you’re in the folder, you will need to modify the assignment file according to the instructions given in the PDF. Assignments need to be done after these videos:

Assignment 01 : After Lecture 06
Assignment 02 : After Lecture 08
Assignment 03 : After Lecture 11
Assignment 04 : After Lecture 13
Assignment 05 : After Lecture 13
Assignment 06 : After Lecture 13
Assignment 07 : After Lecture 15
Assignment 08 : After Lecture 15
Assignment 09 : After Lecture 16
Assignment 10 : After Lecture 18
Assignment E01 (Optional): After Lecture 15

Once you’ve done some code, you need to make sure your code is correct. To do this, you need to run the following command from Anaconda Prompt (while you’re in the assignment folder):

py.test

And that’s it. If you need any help, post a comment below.

Java

The java folder in the downloaded archive contains basic Java intro resources. Videos for these are included in the Vimeo link.