About the Exam
Some Logistics
- if you miss it, you get a 0
- the best indication of the types of questions you'll see is the list of sample exam questions
- expect the exam to to be similar to the easier homework (questions.py and some of the basic programming problems…) and handouts
- expect about 15 questions (give or take a couple) total
- you'll have the entire class period for the exam
Short Answer
- What's a while loop?
- Name some built-in functions and what they do?
Guided Programming Questions
Instructions step you through each statement, you write it…
- create a variable named noun, set it equal to "aardvark"
- create a variable named adjective, set it equal to "agitated"
- use string interpolation to put the two together in a sentence "the agitated aardvark acted awkwardly"
Answer Questions About a Small Sample of Code
(We've seen this before in our quiz.) Some examples:
What's the output… or is there an error?
What type is a?
Questions About Sample Code Continued
What will make the loop run/not run
Is there an error? How do you fix the error?→
Questions About Sample Code Continued Some More
What's the output of…→
Fill in the Blanks
Use a while loop to count backwards from 10 to 0 by 2's
Obviously, Write Some Code
Expect to write…
- if / elif / else
- while and for loops (including counting, summing and sentinel variables)
- modules
- strings, ints, floats, bools and associated operations
- all of that nested within each other (if statements in while loops, for example)
- user input, for example: keep adding numbers that a user inputs, until the user enters quit
There Are X Errors in This Code
Read over a few lines of code; find and fix the syntax and logical errors.
Evaluate Boolean Expressions / Truth Tables
- truth tables for more complex expressions, such as p or q or r
- True and False or not False
- 10 % 5 == 1 or 1 != "hello"
- etc.
Materials Covered
- the exam content is from:
- the slides
- the modules
- the homework
- … the corresponding readings from Starting Out with Python
- if it was not covered in class, homework, or the modules/quizzes, it will not be in the exam
Topics from Slides
- all topics in the slides from classes 1 through 10
- check out the definitions in the slides (they're usually bolded)
- check out the sample problems in the slides
- the built-in functions that were in the homework (and that appeared in slides that we did not go over) may be in the exam
- the following topics from the slides (and modules) will not be in the exam:
- turtle (was only in the online modules)
General Strategies
- don't get bogged down on a single problem, jot down a potential answer and go back to it later
- partial credit is given; don't leave a question blank, even if it's just notes or half an attempt
- double check your work
Sample Code
- go through the code line by line
- write down the values you suspect will be in the variables
- if there's something that requires user input, try going through the code with sample input
Code from Scratch
- plan out what your going to do first
- ask yourself questions, like - will there be data stored, are there repeated actions, etc.
- if there is example output, run through your finished code with the sample data to make sure it works
Review
We have a few options. Which one do you want to do first?
- suggest topics?
- alternate working on sample exam questions and going over answers
- go over review slides
- variables, expressions, statements
- operators and types (int, bool, etc)
- boolean logic
- conditionals / if statements
- loops / while and for
- functions