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
Module 1: (August 30, 2019)
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: (August 31, 2019) 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 (September 7) 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 (September 13): 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]
Modules 7 (September 20, 2019): While Loops.
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Self Tests [click here]
- Pirates [click here]
- Individual Quiz: [click here]
- Activities [click here]
Laboratory 1 (September 21, 2019)
- Laboratory 1 [click here]
Modules 8, 9 (September 27): 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]
Module 10 (October 4): 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 (October 5)
- Laboratory 2 [click here]
- Laboratory 2 Solution [click here]
Module 11 : 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: 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
- Laboratory 3 [click here]
- Laboratory 3 Solution [click here]
Module 13 : 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
- Laboratory 4 [click here]
- Laboratory 4 Solution [click here]
Module 14: 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 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 : 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
- Laboratory 6 [click here]
- avocado.csv [click here]
Laboratory 7: Preparing Hangman for Turn-In
- Laboratory 7 [click here]
Module 16: More on 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]
- normalgenerator.py [click here]
- generator.py [click here]
- Example.zip [click here]
Laboratory 8:
- Laboratory 8 [click here]
- Laboratory 8 Solutions [click here]
Examination Preparation:
- Laboratory 9 [click here]
Sample Examination: )
Examination
Module 17: Using the random module for fun and profit
- 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
- 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
- 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 11
- Laboratory 11 [click here]
Module 20: More on Dictionaries
- 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
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Activities [click here]
- counter.py [click here]
Laboratory 12
- Laboratory 12 [click here]
- Solutions [click here]
Week of Examinations (August 12 - August 19)
Module 22: Tuples and Frozen Sets
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Activities [click here]
- Selftest [click here]
- selftest.py [click here]
- Individual Quiz: [click here]
Laboratory 13
- Laboratory 13 [click here]
Module 23: Comprehension
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Activities [click here]
- Selftest [click here]
- Individual Quiz: [click here]
Laboratory 14
- Laboratory 14 [click here]
Module 24: Comprehension II
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Activities [click here]
- Selftest [click here]
- selftest.py [click here]
- Individual Quiz: [click here]
Laboratory 15
- Laboratory 15 [click here]
Module 25: Exception Handling
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Activities [click here]
- Selftest [click here]
- selftest.py [click here]
- Individual Quiz: [click here]
Laboratory 16
- Laboratory 16 [click here]
Module 26: Preparation CIA
CIA
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Activities [click here]
Python for Big Data II
Module 1 : 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
- Laboratory 4 [click here]
- Laboratory 4 Solution [click here]
Module 2: 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]
Module 3: 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]
- 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 1
- Laboratory 6 [click here]
- avocado.csv [click here]
Module 4: Using the random module for fun and profit
- 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:
- Laboratory 8 [click here]
- Laboratory 8 Solutions [click here]
Module 5: Default arguments for functions and anonymous 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]
Module 6: Dictionaries
- 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
- Laboratory 11 [click here]
Module 7: More on Dictionaries
- 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]
Laboratory 4
- Laboratory 12 [click here]
- Solutions [click here]
Module 8: Tuples and Frozen Sets
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Activities [click here]
- Selftest [click here]
- selftest.py [click here]
- Individual Quiz: [click here]
Laboratory 5
- Laboratory 13 [click here]
Module 9: Comprehension
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Activities [click here]
- Selftest [click here]
- Individual Quiz: [click here]
Laboratory 6
- Laboratory 14 [click here]
Module 10: Comprehension II
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Activities [click here]
- Selftest [click here]
- selftest.py [click here]
- Individual Quiz: [click here]
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Activities [click here]
- Selftest [click here]
- selftest.py [click here]
- Individual Quiz: [click here]
Module 11: Exceptions
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Activities [click here]
- Selftest [click here]
- Individual Quiz: [click here]
Module 12: Classes and Objects I
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Activities [click here]
- Selftest [click here]
- Selftest Solutions [click here]
- Individual Quiz: [click here]
- Complex Class: [click here]
Module 13: Classes and Objects II
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Activities [click here]
- Selftest [click here]
- Selftest Solutions [click here]
- Individual Quiz: [click here]
- Cards Class: [click here]
- Globals Example: [click here]
Module 14: Classes and Objects III
- Presentation (mpg) [click here]
- Presentation (pdf) [click here]
- Activities [click here]
- Individual Quiz: [click here]
- address.py: [click here]
- abq10001.txt [click here]
- abq10002.txt [click here]
- alice.txt [click here]
- iris.csv [click here]