About the Exam

Some Logistics

Types of Questions

Short Answer

Guided Programming Questions

Instructions step you through each statement, you write it…

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?

s = "foo" +  int("5")
print(s * 2)

What type is a?

a = input("enter a number")
print(a)

Questions About Sample Code Continued

What will make the loop run/not run

response = input()
while response == 'go':
	print("going")

Is there an error? How do you fix the error?→

s = "10"
n = 20 + s
print(n)
n = 20 + int(s)

Questions About Sample Code Continued Some More

What's the output of…→

for i in range(50, 59, 2)
	if i == 56:
		print("foo")
	else:
		print("bar")
	print("baz " + str(i))

Fill in the Blanks

Use a while loop to count backwards from 10 to 0 by 2's

count = 
while               :
   print(         )    
   #what else goes here?

Obviously, Write Some Code

Expect to write…

There Are X Errors in This Code

Read over a few lines of code; find and fix the syntax and logical errors.

#  We're just counting from 1 through 10
for num in range(10)
	print("we're just counting " + i)

Evaluate Boolean Expressions / Truth Tables

Exam Topics

Materials Covered

Topics from Slides

Test-Taking Strategies

General Strategies

Sample Code

Code from Scratch

Any Questions About Material or Exam Format?

Review

We have a few options. Which one do you want to do first?