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)
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, 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
- Random number generation: random.randrange() (Tutorial example)
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
Usability Heuristics
Lecture topics covered so far |
Approximate proportion of exam1 |
UNIX commands | ~6% |
Intro to the course/administrative notes | 4 |
Introduction to programming (excludes data representations slides 57 - 61) | 25 |
Branches | 29 |
Repetition | ~34% |
Decomposition | Not on midterm |
Again: You are expected to be familiar with common functions that have been covered in class such as: print(), input(), int(), float(), str(), randrange().
Multiple choice questions 30 marks |
|
30 marks per question = 30 marks total | |
Short answer questions 17 marks |
|
2 code tracing questions = 10 marks | |
1 code writing question = 7 marks |
1 It's based on a near-final version of the midterm (exact proportions may vary *slightly*)
Min cut-off % | GPA | |
0.00 | 0 | |
10.00 | 0.1 | |
15.00 | 0.2 | |
20.00 | 0.3 | |
25.00 | 0.4 | |
30.00 | 0.5 | |
35.00 | 0.6 | |
38.00 | 0.7 | |
41.00 | 0.8 | |
45.00 | 0.9 | |
48.00 | 1 | D |
50.00 | 1.1 | |
52.00 | 1.2 | |
54.00 | 1.3 | D+ |
56.00 | 1.4 | |
58.00 | 1.5 | |
60.00 | 1.6 | |
61.00 | 1.7 | C- |
62.00 | 1.8 | |
64.00 | 1.9 | |
65.00 | 2 | C |
66.00 | 2.1 | |
67.00 | 2.2 | |
68.00 | 2.3 | C+ |
69.00 | 2.4 | |
70.00 | 2.5 | |
71.00 | 2.6 | |
72.00 | 2.7 | B- |
73.00 | 2.8 | |
74.00 | 2.9 | |
75.00 | 3 | B |
76.00 | 3.1 | |
77.00 | 3.2 | |
78.00 | 3.3 | B+ |
79.00 | 3.4 | |
80.00 | 3.5 | |
81.00 | 3.6 | |
82.00 | 3.7 | A- |
83.00 | 3.8 | |
84.00 | 3.9 | |
85.00 | 4 | A |
94.00 | 4.1 | |
96.00 | 4.2 | |
98.00 | 4.3 |