This is an inverted class, given in conjunction with similar classes at Xavier College (autonomous) in Ahmedabad, Gujarat, India, and Xavier Institute of Engineering in Mumbai, Maharashtra, India.
Syllabus
This is an inverted classroom experience. Students will listen to the presentation (about 10 minutes) before each class and then use their classroom time to learn by doing in groups of two equally strong students. There will be individual and group quizzes (taking up about 5 minutes each) for each class.
Here is the complete syllabus. --Click here.--
Office Hours
- Thomas Schwarz MWF 14:10 - 15:00 or by appointment.
Piazza Discussion Board
There is a piazza discussion board. Sign up at this link to the piazza website .
Contents
Week 1
Module 1 (August 26, 2019): Getting started with Python. We learn how to install Python, how to use IDLE, and how to write very simple programs. You should first listen to the presentation, then use the checklist and the home activities to insure that you understood the lesson. You should then take the Individual Quiz. You will have to fill out another one in class. For this module only, there is a Group Quiz that you can prepare. In future modules, the Group Quizzes will test the extent of the pre-class activities.
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Checklist (pdf) [click here]
- Pre-class Activities [click here]
- In-class Activities [click here]
- Individual Quiz [click here]
- Group Quiz [click here]
- Hello World Python sript[click here]
- Synopsis [click here]
Module 2 (August 28, 2019): Variables, types, and expressions.
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Activities [click here]
- Group Quiz [click here]
- Individual Quiz [click here]
- Synopsis [click here]
Laboratory 1
- Laboratory I [click here]
- Zip file for Project 1 [click here]
Module 3 (August 30, 2019): Algorithms.
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Activities [click here]
- Synopsis [click here]
Week 2
The power of a programming arises from different executions based on changing circumstances. We begin to study alternate paths of execution with the if-elif-else construct and start with loops.
Laboratory 2
- Laboratory II [click here]
Module 4 (September 4, 2019): Conditional statements
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Selftest [click here]
- Selftest Solution [click here]
- In-class Activities [click here]
- Individual Quiz [click here]
- Synopsis [click here]
Module 5 (September 6, 2019): Conditional Statements 2.
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Selftest [click here]
- Selftest Solution [click here]
- In-class Activities [click here]
- Individual Quiz [click here]
- Synopsis [click here]
Week 3
We have already seen how a program is able to react flexibly to the circumstances it encounters. Now we learn how to repeat certain blocks of statement or how to walk through a list of possibilities.
Module 6 (September 9, 2019): For loops.
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- In-class Activities [click here]
- Individual Quiz [click here]
- Synopsis [click here]
The FuzzBuzz Interview Question
Here is a question that is used in interviews for entry programming level positions. You are to print all numbers between 1 and 100 (both included) on separate lines. However, if the number is divisible by three, instead of printing out the number print out "Fuzz", if the number is divisible by five, instead print out "Buzz", and if the number is divisible by both, print out "FuzzBuzz". If you just started programming, this is a non-trivial question and you should give yourself some time solving it. Here is my solution:
- FuzzBuzz Solution [click here]
Laboratory 3 (September 10 and 12, 2019)
- Laboratory 3 [click here]
Module 7 (September 11, 2019): While loops.
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Self-test (pdf) [click here]
- Self-test (solutions) [click here]
- In-class Activities [click here]
- Individual Quiz [click here]
- Synopsis [click here]
Module 8 (September 13, 2019): Functions.
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Self-test (pdf) [click here]
- Self-test (solutions) [click here]
- In-class Activities [click here]
- Individual Quiz [click here]
- Synopsis [click here]
Week 4
Module 9 (September 16, 2019): Functions in Action.
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (pptx) [click here]
- Self-test (pdf) [click here]
- Self-test (solutions) [click here]
- In-class Activities [click here]
- Individual Quiz [click here]
- Synopsis [click here]
Laboratory 4 (September 17 and 19, 2019)
- Laboratory 4 [click here]
Module 10 (September 18, 2019): More on Functions.
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Self-test (pdf) [click here]
- Self-test (solutions) [click here]
- In-class Activities [click here]
- Individual Quiz [click here]
- Synopsis [click here]
Module 11 (September 20, 2019): Lists
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Self-test (pdf) [click here]
- Self-test (solutions) [click here]
- In-class Activities [click here]
- Individual Quiz [click here]
- Synopsis [click here]
Week 5
First Midterm Preparation
- Text (pdf) [click here]
- Solutions (py) [click here]
Module 12 (September 23, 2019): String Processing.
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Self-test (pdf) [click here]
- Self-test (solutions) [click here]
- In-class Activities [click here]
- Individual Quiz [click here]
- Synopsis [click here]
Laboratory 5 (September 24 and 26, 2019): Lists and Strings
- Laboratory 5 [click here]
First Midterm Preparation
The last question is really too difficult to be on a midterm, but you might enjoy a challenge.
- Text (pdf) [click here]
- Solutions (py) [click here]
Module 13 (September 25, 2019): More on List and String Processing.
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Self-test (pdf) [click here]
- Self-test (solutions) [click here]
- In-class Activities [click here]
- Individual Quiz [click here]
- Synopsis [click here]
First Midterm Preparation
These are fairly easy questions.
- Text (pdf) [click here]
- Solutions (py) [click here]
First Midterm Preparation
These are more difficult questions.
- Text (pdf) [click here]
- Solutions (py) [click here]
Module 14 (September 27, 2019) Interacting with Files:
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Self-test (pdf) [click here]
- Self-test (solutions) [click here]
- In-class Activities [click here]
- Individual Quiz [click here]
- Synopsis [click here]
Project 1: Part 1
The first project consists of three different parts. In this first part, we create our own function for military time. Please note that you are not allowed to use "advanced" Python functions or classes for this. The second part will concern file processing.
- Project 1 A [click here]
Midterm Preparation Consultations
I will be in CU 101
- Thursday 8:00 pm - 10:00 pm
- Saturday 7:00 pm - 9:00 pm
- Sunday 3:00pm - 5:00pm
for consultation and help with the sample problems.
Week 6
First Midterm , Monday, September 30, 2019
The first midterm will cover input/output, conditional execution, for loops, while loops, and string processing.
Laboratory 6: October 1 and October 3
- Laboratory 6 [click here]
Module 15 (October 2, 2019) String Formatting:
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- F-String Presentation (mpg) [click here]
- F-String Presentation (pdf) [click here]
- F-String Presentation (key) [click here]
- Self-test (pdf) [click here]
- Self-test (solutions) [click here]
- In-class Activities [click here]
- Individual Quiz [click here]
- Synopsis [click here]
Module 16 (October 4, 2019) More on String and File Processing:
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Self-test (pdf) [click here]
- Self-test (solutions) [click here]
- In-class Activities [click here]
- Individual Quiz [click here]
- Synopsis [click here]
Project 1: Part 2
The second part consists of interacting with a dataset of crime in Denver, Co.
- Project 1 B [click here]
Week 7
Module 17 (October 7, 2019) The Random Module:
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Self-test (pdf) [click here]
- Self-test (solutions) [click here]
- In-class Activities [click here]
- Individual Quiz [click here]
- Synopsis [click here]
Laboratory 7: October 8 and October 10
- Laboratory 7 [click here]
Module 18 (October 9, 2019) Functions with Default Arguments:
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Self-test (pdf) [click here]
- Self-test (solutions) [click here]
- In-class Activities [click here]
- Individual Quiz [click here]
- Synopsis [click here]
Module 19 (October 11, 2019) Dictionaries:
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Self-test (pdf) [click here]
- Self-test (solutions) [click here]
- In-class Activities [click here]
- Individual Quiz [click here]
- Synopsis [click here]
- alice.txt [click here]
- clement.txt [click here]
- HIV.txt [click here]
- mobydick.txt [click here]
Week 8
Module 20 (October 14, 2019) More on Dictionaries:
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Self-test (pdf) [click here]
- Self-test (solutions) [click here]
- In-class Activities [click here]
- Individual Quiz [click here]
- Synopsis [click here]
Laboratory
Because of the midterm break, the laboratory is shorter and only virtual. Please submit your solutions via D2L to your laboratory section.
- Laboratory 8 [click here]
- alice.txt [click here]
- countries.txt [click here]
- numbers.txt [click here]
- iris.csv [click here]
Module 21 (October 16, 2019) Tuples, Sets, and Frozen Sets:
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Self-test (pdf) [click here]
- Self-test (solutions) [click here]
- In-class Activities [click here]
- Individual Quiz [click here]
- Synopsis [click here]
Week 9
Module 22 (October 21, 2019) Comprehension:
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Self-test (pdf) [click here]
- Self-test (solutions) [click here]
- In-class Activities [click here]
- Individual Quiz [click here]
- Synopsis [click here]
Laboratory 9: October 22 and October 23
- Laboratory 9 [click here]
- alice.txt [click here]
- 2201.txt [click here]
Module 23 (October 23, 2019) Comprehension in Action:
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Self-test (pdf) [click here]
- Self-test (solutions) [click here]
- In-class Activities [click here]
- Individual Quiz [click here]
- Synopsis [click here]
Module 24 (October 25, 2019) Exception Handling:
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Self-test (pdf) [click here]
- Self-test (solutions) [click here]
- In-class Activities [click here]
- Individual Quiz [click here]
- Synopsis [click here]
Project 1 Due Date: October 31, 2019
To turn in the project, you need to demonstrate it to me. Please have a folder with all of your python files as well as the result csv ready for inspection. You can show the project to me in my office hour or when I visit the laboratories. Groups should turn in together.
Projects that contain an error or that miss the submission deadline can be resubmitted for 80\% of the points next week. After that, they can be resubmitted for 64\% the next week.
Week 10
Midterm Preparation: (October 28, 2019)
- Sample Midterm 1 [click here]
- Sample Midterm 1 Solution [click here]
- Sample Midterm 2 [click here]
- Sample Midterm 2 Solution [click here]
- pinocchio.txt to check [click here]
Laboratory 10: (October 29 and October 31, 2019)
- Laboratory 10 [click here]
- lawler.txt [click here]
- vocabulary.txt [click here]
Second Midterm: (October 30, 2019)
Module 25 (November 1 -- Hallowmass) Classes and Objects 1:
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Self-test (pdf) [click here]
- Self-test (solutions) [click here]
- In-class Activities [click here]
- Individual Quiz [click here]
Week 11
Module 26 (November 4, 2019) Classes and Objects 2:
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Self-test (pdf) [click here]
- Self-test (solutions) [click here]
- In-class Activities [click here]
- Individual Quiz [click here]
Laboratory 11: November 5 and November 7, 2019
- Laboratory 11 [click here]
Module 27 (November 6, 2019) Classes and Objects 3:
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Self-test (pdf) [click here]
- Self-test (solutions) [click here]
- In-class Activities [click here]
- Individual Quiz [click here]
- address.py [click here]
Module 28 (November 8, 2019) Classes and Objects 4:
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Self-test (pdf) [click here]
- Self-test (solutions) [click here]
- In-class Activities [click here]
- Individual Quiz [click here]
Week 12
Project 2
This project builds on the work to be done in the following two modules. Tentative due date is in the labs on November 19 and November 21. As always, projects need to be demonstrated. The extra credit parts can be demonstrated anytime before the final examination. Up to three students can work on a project.
- Project Description [click here]
- view.py [click here]
- model.py [click here]
- geometry.py [click here]
Module 29 (November 11, 2019): Classes in Action 1
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- In-class Activities [click here]
- Individual Quiz [click here]
Laboratory 12 : November 12 and November 14, 2019
- Laboratory 12 [click here]
Module 30 (November 13, 2019) Classes in Action 2:
- This module has no presentation. Please review the previous presentation.
- In-class Activities [click here]
- Individual Quiz [click here]
Module 31 (November 15, 2019) Decision Trees:
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Self-test (pdf) [click here]
- Self-test (solutions) [click here]
- In-class Activities [click here]
- Individual Quiz [click here]
- examples.py [click here]
- iris.csv [click here]
- iris.py [click here]
Make-Up Midterm
The make-up midterm is scheduled on Tuesday, December 3, at 10:00 am at a location yet to be determined. In order to participate in the midterm, you need to have successfully completed the qualifier (below) and reserved a spot. 90% of your score on the make-up midterm will replace the worse score of your two midterm examination grades. This means that you can actually lower the score. If you pass the make-up midterm with 50% of the points, you will be imputed to have passed both midterms with 50%.
- Qualifier [click here]
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Self-test (pdf) [click here]
- Self-test (solutions) [click here]
- In-class Activities [click here]
- Individual Quiz [click here]
- python_milwaukee.gif[click here]
- python_milwaukee.jpg[click here]
- python_milwaukee.png[click here]
- tkinter0.py[click here]
- tkinter1.py[click here]
- tkinter2.py[click here]
- tkinter3.py[click here]
- tkinter4.py[click here]
- tkinter5.py[click here]
- Individual Quiz [click here]
- Laboratory 13 [click here]
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Self-test (pdf) [click here]
- Self-test (solutions) [click here]
- In-class Activities [click here]
- Individual Quiz [click here]
- shakespeare.gif[click here]
- button0.py[click here]
- button0.py[click here]
- button0.py[click here]
- button0.py[click here]
- button0.py[click here]
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Self-test (pdf) [click here]
- Self-test (solutions) [click here]
- In-class Activities [click here]
- Individual Quiz [click here]
- radio.py [click here]
- binding.py [click here]
- entry.py [click here]
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Self-test (pdf) [click here]
- Self-test (solutions) [click here]
- In-class Activities [click here]
- Individual Quiz [click here]
- Presentation (mpg) [click here]
- Description [click here]
- minesweeper_main.py [click here]
- Activities: [click here]
- Solutions (pdf): [click here]
- Solutions (mp4): [click here]
- Code: [click here]
- Activities: [click here]
- Presentation (pdf): [click here]
- Presentation (mp4): [click here]
- Code: [click here]
- Makeup midterm [click here]
- Solutions [click here]
- Tkinter problems [click here]
- Solutions [click here]