Introduction to Computer Science I for majors by James Tam | Return to the course web page |
(I will add information here as we get closer to the exam so you should check back here for updates)
- Pavol Federol's lectures (9:30 AM and 14:00 PM): write in ST140
- James Tam's lecture (3:30 PM): write in ST148
Introduction to programming
- Creating, translating programs into binary/machine language and executing programs
- Variables: declaring, assigning values, accessing, naming conventions
- Named constants: difference from variables, naming conventions
- Common arithmetic operators, order of operation
- Print(): displaying string vs. memory (variables, constants) output, format specifiers (only precision was covered in lecture), escape codes, triple quoted output
- Input()
- Functions that convert types: int(), float(), int()
- Strings: concatenation
- Program documentation: inline and header
- The three types of errors: syntax, runtime, logic. How they differ, when they occur, examples of each
Decision making
- Branching structures: IF, IF-ELSE, IF-ELIF and multiple IFs
- Logical operators: AND, OR, NOT (logical expressions formed inside of Python programs and formed outside of coding e.g. truth tables)
- Nested branches
- Minimum test cases for decision making structures
- Drawbacks of floating point variables and the use of an Epsilon
Repetition
- Categories of looping structures: pre-test, post-test
- FOR loops, WHILE loops
- Examples of counting loops: single increment, decrement, increments/decrements in values other than one
- WHILE loops that don't update by a additive amount (e.g. increase by a product)
- FOR loops that iterate through strings
Erroneous loops: never end, never run
Sentinel controlled loops
Nesting: nested loops, branches nested in loops, loops nested in branches
Minimum test cases for loops
(The Usability Heuristics won't be covered on your midterm)
Lecture topics covered so far |
Approximate proportion of exam1 |
UNIX commands | ~8% |
Introduction to programming | 30 |
Branches | 28 |
Repetition | 33 |
Decomposition | ??? |
You are expected to be familiar with common functions that have been covered in class such as: print(), input(), int(), float(), str(), randint().
Multiple choice questions 31 marks |
|
31 questions | |
Short answer questions 20 marks |
|
2 code traces worth 11 marks in total | |
1 code writing worth 9 marks |
1 It's based on a near-final version of the midterm (exact proportions may vary *slightly*)
Min percentage | GPA |
0 | 0 |
20 | 0.1 |
30 | 0.2 |
39.3 | 0.3 |
40.8 | 0.4 |
42.4 | 0.5 |
43.9 | 0.6 |
45.4 | 0.7 |
46.9 | 0.8 |
48.5 | 0.9 |
50 | 1 |
51.5 | 1.1 |
53.1 | 1.2 |
54.6 | 1.3 |
56.1 | 1.4 |
57.6 | 1.5 |
59.1 | 1.6 |
60.7 | 1.7 |
62.2 | 1.8 |
63.7 | 1.9 |
65.2 | 2 |
66.7 | 2.1 |
68.3 | 2.2 |
69.8 | 2.3 |
71.3 | 2.4 |
72.8 | 2.5 |
74.3 | 2.6 |
75.9 | 2.7 |
77.4 | 2.8 |
78.9 | 2.9 |
80.4 | 3 |
81.9 | 3.1 |
83.4 | 3.2 |
84.9 | 3.3 |
86.4 | 3.4 |
87.9 | 3.5 |
89.5 | 3.6 |
91 | 3.7 |
92.5 | 3.8 |
94 | 3.9 |
95.5 | 4 |
97 | 4.1 |
98.5 | 4.2 |
100 | 4.3 |