Introduction to Computer Science I for non-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 (i.e. not only knowing how to create and run a program but also what is happening during that process)
- 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 (you will be tested on the parts covered in lecture), escape codes (as you should have learned to apply with the first graded assignment), triple quoted output.
- Input()
- Functions that convert types: int(), float(), int()
- Strings: concatenation
- Program documentation: inline and header. You may not need to write any for the exam but you should know what each one is and how they differ.
- The three types of errors: syntax, runtime, logic. How they differ, when they occur, examples of each
- Random number generation: random.randrange()
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 and the other layouts covered in lecture)
- Nested branches
- Minimum test cases for decision making structures.
- Drawbacks of floating point variables and the use of an Epsilon (this latter topic was only covered in previous semesters so you won't be explicitly tested on this material).
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 (loops inside of loops), branches nested in loops, loops nested in branches
Minimum test cases for loops
Jakob Nielsen's Usability Heuristics (not covered this semester so you won't be examined on this topic)
Decomposition
- Only topics from the "Part I" notes will be covered on the midterm (functional decomposition will be a major portion of the final exam either directly or indirectly e.g. "write a function that performs some list operation").
Topic |
Approximate proportion of exam1 |
Examination instructions and exam information (this means that you have to read the contents of this web page including the exam instructions) | ~ 5- 7% |
Intro to the course/administrative notes | 5- 7% |
Introduction to programming (excludes specific details of different variables (float, integer, string) are stored but you should know that they are represented differently) | 10 - 15% |
Branches | 35 - 45% |
Repetition | 15 - 20% |
Decomposition (Part I only) | 5- 7% |
Miscellaneous2 | ~ 10 - 15% |
Again: You are expected to be familiar with common functions that have been covered in class such as: print(), input(), int(), float(), str(), randrange().
Topic |
Approximate proportion of exam1 |
Non-multiple choice: 2 code writing | ~1/3 |
Multiple choice:~20 - 25 | ~2/3 |
1 Exam proportions: It's based on a near-final version of the midterm (exact proportions may
vary *slightly)*
2 Miscellaneous questions: Material that doesn't fall neatly into one of the above categories
e.g. spans multiple topics
During one semester of CPSC 231 had a midterm with 23 multiple choice questions and 1 short answer question during a class time of no more than 50 minutes. (The class was scheduled for 50 minutes but there's typically a class before and a class afterward with the result that setup/handing out exams may reduce the maximum time for writing the exam).
Min. percentage cut off to be awarded grade point GPA |
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 |
50.00 | 1.1 |
52.00 | 1.2 |
54.00 | 1.3 |
56.00 | 1.4 |
58.00 | 1.5 |
60.00 | 1.6 |
61.00 | 1.7 |
62.00 | 1.8 |
64.00 | 1.9 |
65.00 | 2 |
66.00 | 2.1 |
67.00 | 2.2 |
68.00 | 2.3 |
69.00 | 2.4 |
70.00 | 2.5 |
71.00 | 2.6 |
72.00 | 2.7 |
73.00 | 2.8 |
74.00 | 2.9 |
75.00 | 3 |
76.00 | 3.1 |
77.00 | 3.2 |
78.00 | 3.3 |
79.00 | 3.4 |
80.00 | 3.5 |
81.00 | 3.6 |
82.00 | 3.7 |
84.00 | 3.8 |
86.00 | 3.9 |
88.00 | 4 |
93.00 | 4.1 |
95.00 | 4.2 |
97.00 | 4.3 |