CPSC 231: Midterm Information
(I will add information here as we get closer to the exam so you should check
back here for updates)
Date/location:
Review material:
- During lecture as I cover the material I have provided suggestions of what an
exam-like question may look like. You should attend class for this info and note
the details as it comes up.
- Multiple choice exam review questions: They can be found in D2L under:
Assessments->Quizzes
- Correction to a Quiz (May 29): Midterm
review questions, not graded: questions from the exam instructions/exam
information
- Question 3: Option (d) is the correct answer.
- Short answer questions: as I get time I will add
them here (not D2L as D2L cannot automatically grade written work and it
doesn't allow solutions to be easily posted along with a quiz that includes
written questions).
- Short answer review questions for the programming introduction
(keep in mind that format specifiers will only appear on the midterm if they
were covered in class): [Question
descriptions] [Solutions -
try the question before looking here!]
- Short answer review questions for the branching section: [Question
descriptions] [Solutions - try the question before looking here!]
- Short answer review questions for the section on repetition: [Question
descriptions] [Solutions - try the question before looking here!]
- New (spring 2024): short answer review question
for logic/theory: [Question
descriptions] [Solutions - try the question before looking here!]
- Still want more practice questions?
- Try working through the sample problems in the [recommended
textbook]
- Finished all the textbook problems and want still more? Try working
through practice problems in the (Python v3.X) textbooks that you can find
via the [UC-library
website]. (Note that I haven't personally vetted the textbooks for
quality or match for this course so you will need to do that beforehand).
Instructions for the day of the exam (instructions that you should follow
when you enter the room before you start writing)
- Duration: 60 Minutes during the last
part of lecture
- This is a closed book exam: No aids of any sort will be allowed
(e.g., cell phones must be shut off and out of sight, calculators,
laptops, hand held computers, slide rulers, abaci should not be brought
into the exam room) will be allowed.
- DO NOT OPEN the exam until you are told to do so.
- Unless told otherwise you won't be graded for style and
documentation.
- You can assume no syntax errors in the instructions unless told
otherwise in a question.
- This exam will follow python 3.x syntax.
- Multiple choice instructions:
- Fill in the contact information
for all labeled categories
- Instructor: James Tam
- Date: May 30, 2024
- Course name: CPSC
- Course number: 231
- Lecture section: 01
- Version: Don't need to fill this in for this exam
- Use an HB pencil or darker (don't use pen) to mark the best
answer to each question
- Important backup for the
Scantron answer sheet: In addition to filling in the bubbles
make sure you print the required information as well (e.g.
mark you student ID number into the bubble but you also need to
print your name in the appropriate location as well).
- Instructions for the written
questions:
- You must use a pen for the
written questions. If you use a pencil then this may affect grading.
If
you find a regular pen awkward then an FYI, there exist several brands
of erasable pens. Typically the writing can be erased with a regular
eraser for a period of time after which it eventually becomes permanent.
If you just cannot find any place that sells them then here are some [example
places].
But you aren't required to use an erasable pen, it's just a suggestion
if you find writing with a regular pen awkward.
- Put your answer in the specified
space.
-
To be
awarded credit for your exam you
need to hand in both your multiple-choice answer sheet and the
question booklet with the Scantron sheet inside of the booklet.
Material that you should study
- The lecture material: the PowerPoint slides will provide you with an
outline of the topics to be covered. However studying the information just
listed on the slides won't be sufficient to do well on the final exam. You
will also need to take notes in class and to study and understand those
notes. If you have any questions then make sure that you ask me for help and
clarification.
- Text books: can be used as another source of material to help
you understand the material as you prepare for the exam. I won't however
directly examine you on material that is listed in the textbooks that I
didn't cover in class.
- Tutorial exercises and the tutorial handouts: what TAs cover in tutorial
can also be evaluated in the exam.
Lecture topics (exam review)
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)
Exam topics
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) |
~4 - 6% |
|
Intro to the course/administrative notes |
~4 - 6% |
|
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 |
~30 - 35% |
|
Repetition |
~30 - 35% |
|
Decomposition |
Part I of this section: ~7 - 10% |
|
Miscellaneous2 |
??? |
Again: You are expected to be familiar with common functions that have been covered
in class such as: print(),
input(), int(),
float(), str(),
randrange().
Exam questions1
Topic
|
Approximate proportion of exam1
|
|
Non-multiple choice: 2 |
~1/3 |
|
Multiple choice: ~20 - 30 |
~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 |