This is an inverted class, to be given simultaneously at Marquette University, Milwaukee, Xavier Institute of Engineering, Mumbai, and St. Xavier's College (Autonomous), Ahmedabad. I'd be interested to collaborate with other institutions.
Syllabus
This is an inverted classroom experience. Students will listen to the presentation (about 10 minutes) before each class, engage in self-guided activities, take self-tests and solve an individual quiz. Each class starts with an individual quiz (known to the students) and a group quiz, to be answered by two or three students together. The bulk of the class consists in activities during which instructor help is available. Students will perform these activities in groups of two and be graded for some of them.
For the complete syllabus, click here.
Modules
Week 1
Module 1: (June 18)
Getting started with Python. We learn how to install Python, how to use IDLE, and how to write very simple programs.
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Activities [click here]
- Group Quiz [click here]
- Hello World Python sript[click here]
Module 2: (June 19) Variables, types, and expressions.
Notice that both quizzes are given to you in advance.
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- In class Activities [click here]
- Group Quiz [click here]
- Individual Quiz [click here]
Modules 3 and 4: (June 20) Conditional Execution.
First a brief repetition about algorithms. Then a short introduction to conditional execution. The new thing to learn is that Python uses white spaces instead of curly braces to creates blocks and nesting.
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- In class Activities [click here]
- Individual Quiz [click here]
Modules 5 and 6 (June 21): For Loops.
The first presentation introduces Boolean operations. In contrast to languages like C and Java, Python gives the programmer more flexibility. The programmer can use English words or use the same symbols as C. We will later see that Python manages negations in a manner consistent with English grammar.
The second presentation introduces for loops. Python for loops are different from
loops in Java and C as they are list-oriented. At this point, we only treat the case
of lists generated by the range keyword. Range is very flexible, but it also introduces
the first Python idiosyncrasy. If I want to list all integers between 1 and 100 (ends
included), I say for i in range(1, 101)
. This is a poor design decision,
but it is better than all the alternatives. It is also much more flexible than the
C or Java construct for(int i = 1; i<=100; i++)
that restricts the loop
variable to one type and that uses a continuation criterion.
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Presentation (key) [click here]
- Activities [click here]
- Individual Quiz for June 21, 2019 [click here]
Week 2
Modules 7 (June 24): While Loops.
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Self Tests [click here]
- Pirates [click here]
- Individual Quiz: [click here]
- Activities [click here]
Modules 8, 9 (June 25): Functions.
- Presentation A (mpg) [click here]
- Presentation A (pdf) [click here]
- Presentation B (mpg) [click here]
- Presentation B (pdf) [click here]
- Self Tests [click here]
- Solution to Self Tests [click here]
- Individual Quiz: [click here]
- Activities [click here]
Laboratory 1 (June 26)
- Laboratory 1 [click here]
Module 10 (June 27): More on Functions.
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Self Tests [click here]
- Solution to Self Tests [click here]
- Individual Quiz: [click here]
- Activities [click here]
Laboratory 2 (June 28)
- Laboratory 2 [click here]
- Laboratory 2 Solution [click here]
Module 11 (July 1): Lists.
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Self Tests [click here]
- Solution to Self Tests [click here]
- Individual Quiz: [click here]
- Activities [click here]
Module 12 (July 2): Strings I.
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Self Tests [click here]
- Solution to Self Tests [click here]
- Individual Quiz: [click here]
- Activities [click here]
Laboratory 3 (July 3)
- Laboratory 3 [click here]
- Laboratory 3 Solution [click here]
Module 13 (July 3): Strings II.
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Self Tests [click here]
- Solution to Self Tests [click here]
- Individual Quiz: [click here]
- Activities [click here]
Laboratory 4 (July 4)
- Laboratory 4 [click here]
- Laboratory 4 Solution [click here]
Module 14 (July 8): Files.
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Self Tests [click here]
- Solution to Self Tests [click here]
- Individual Quiz: [click here]
- Activities [click here]
- Files to download:
- abq10001.txt [click here]
- abq10002.txt [click here]
- alice.txt [click here]
- iris.csv [click here]
Laboratory 5 (July 9 / 10) and first Project
We are programming the game of "Hangman". There are many implementations of Hangman that you can get on the Internet, but they will do you no good. You are to hand in a Hangman project based on these particular instructions.
- Laboratory 5 [click here]
- Lawler English vocabulary [click here]
Module 15 (July 11): String Formatting.
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Self Tests [click here]
- Solution to Self Tests [click here]
- Individual Quiz: [click here]
- Activities [click here]
Laboratory 6 (July 12)
- Laboratory 6 [click here]
- avocado.csv [click here]
Laboratory 7: Preparing Hangman for Turn-In (July 15)
- Laboratory 7 [click here]
Module 16: More on String Formatting (July 16)
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Self Tests [click here]
- Solution to Self Tests [click here]
- Individual Quiz: [click here]
- Activities [click here]
- normalgenerator.py [click here]
- generator.py [click here]
- Example.zip [click here]
Laboratory 8: (July 17)
- Laboratory 8 [click here]
- Laboratory 8 Solutions [click here]
Examination Preparation: (July 18)
- Laboratory 9 [click here]
Sample Examination: (July 19)
Examination (July 24)
Module 17: Using the random module for fun and profit (July 25)
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Self Tests [click here]
- Solution to Self Tests [click here]
- Individual Quiz: [click here]
- Activities [click here]
Module 18: Default arguments for functions and anonymous functions (July 26)
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Self Tests [click here]
- Solution to Self Tests [click here]
- Individual Quiz: [click here]
- Activities [click here]
Module 19: Dictionaries (July 29)
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Self Tests [click here]
- Solution to Self Tests [click here]
- Individual Quiz: [click here]
- Activities [click here]
St. Ignatius Day (July 31)
Laboratory 11 (August 1)
- Laboratory 11 [click here]
Module 20: More on Dictionaries (August 2)
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Self Tests [click here]
- Solution to Self Tests [click here]
- binomial.py [click here]
- binomial.py [click here]
- Individual Quiz: [click here]
- Activities [click here]
Module 21: Exam Preparation (August 5)
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Activities [click here]
- counter.py [click here]
Laboratory 12 (August 7)
- Laboratory 12 [click here]
- Solutions [click here]
Week of Examinations (August 12 - August 19)
Module 22: Tuples and Frozen Sets (Week of August 19-24 I)
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Activities [click here]
- Selftest [click here]
- selftest.py [click here]
- Individual Quiz: [click here]
Laboratory 13 (Week of August 19-24 II)
- Laboratory 13 [click here]
Module 23: Comprehension (Week of August 26-31 I)
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Activities [click here]
- Selftest [click here]
- Individual Quiz: [click here]
Laboratory 14 (Week of August 26-31 II)
- Laboratory 14 [click here]
Module 24: Comprehension II (Week of September 2-7 I)
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Activities [click here]
- Selftest [click here]
- selftest.py [click here]
- Individual Quiz: [click here]
Laboratory 15 (Week of September 2-7 II)
- Laboratory 15 [click here]
Module 25: Exception Handling (Week of September 9-14 I)
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Activities [click here]
- Selftest [click here]
- selftest.py [click here]
- Individual Quiz: [click here]
Laboratory 16 (Week of September 9-14 II)
- Laboratory 16 [click here]
Module 26: Preparation CIA (Week of September 16-21 I)
CIA (Week of September 16-21 II)
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Activities [click here]
Second Semester
Module 1 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]
- complex.py [click here]
Module 2 (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 1
- Laboratory 1 [click here]
Module 3 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 4 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]
Project
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 5: 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 2 :
- Laboratory 2 [click here]
Module 6 Classes in Action 2:
- This module has no presentation. Please review the previous presentation.
- In-class Activities [click here]
- Individual Quiz [click here]
Module 7 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]
Module 8 Tkinter 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]
- 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 3
- Laboratory 3 [click here]
Module 9 Tkinter 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]
- shakespeare.gif[click here]
- button0.py[click here]
- button0.py[click here]
- button0.py[click here]
- button0.py[click here]
- button0.py[click here]
Module 10 Tkinter 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]
- radio.py [click here]
- binding.py [click here]
- entry.py [click here]
Module 11 Tkinter 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]
- gol.py [click here]
- cells.py [click here]