Course Supervisor: Professor Gray Monnard
Lab Section: Wed 11:20A - 12:20P at 301 MLH
Office Hours: Tue & Thu 12:30P - 1:30P at 301 MLH ( at 201C MLH for first two weeks only due to unavailability of 301), and by appointment.
Topics, examples and files (by week)
Week 1
Topics covered:
- objectives and goals of the lab class
- an introduction to the Wing IDE
- some differences between python version 2 and 3
- basic data types (int, float, string and boolean) and variables
- Some operators
- functions: type(), int(), float(), print(), input().
Program: area.py
Week 2
Topics covered:
- Operators: modulus (%), exponential (**), concatenation (+), comparison operators ( ==, !=, <=, >=, >, <)
- if, if-else, if-elif-else statements
- A quick intro to while loops
Program: lab2.py
Week 3
Topics covered:
- Developing a simple calculator
- Loop control statements: break and continue
- Basic string operations
Programs: calculator.py lab3.py
Week 4
Topics covered:
- Practice on strings, lists and functions
- Different list operations
Programs: ourCount.py list_example.py
Week 5
More practice on strings, lists, functions and loops
Programs: palindrome.py lab5.py
Week 6
Topics covered: reviewing OAM instruction set, writing programs for OAM.
Programs: OAM_examples
Week 7
We wrote some programs related to string processing, two dimensional array (list of lists), matrix processing etc.
Programs: printbox.py prefix.py matrix.py (incomplete)
Week 8
We completed the program (matrix.py) that we started last week. We emphasized on developing and calling functions while completing the program. We also implemented a number guessing game to understand the Binary Search Algorithm. We ended the lab with a quick review of the final exam.
Programs: matrix_lab8.py number_guessing_game.py