Test 1 Review Sheet

Test date: Wednesday, September 30, 2015
Test location: normal lecture hall (you MUST go to your assigned section)
Test duration: 50 minutes (for 1110 and 1111)
Test format: writing on paper; bring pen/pencil (and nothing else)
Review session: Monday, September 28, 7:00-8:00 PM in Wilson 402

Review Sheet

General Points:

  • There will be a coding question; problem solving will be involved.
  • You should be able to read code and interpret what it is doing.

Not on the test:

  • Drawing with the turtle will not be on the test
  • You do not have to know what to import to get access to various things (we will provide this for you)

CS in General:

  • Where do we see computers in the world?
  • What is ambiguity? What has that got to do with CS?
  • Why is it important for people to have a basic understanding of computing?

Primitives and Types:

  • Know the basic primitive types (int, float, bool, str)
  • Know the basic mutable collection types (list and dictionary)
  • Know how casting works (i.e., how to turn a str into an int)
  • Know the operators, including %, +=, /, //, and the various comparison and boolean operators (!=, not, or, and)
  • Know how to declare a variable and change what is inside it
  • Know how to get a random integer
  • Know how to get input from the user
  • Know the basic methods for use with lists and dictionaries
  • Know how to split a string into a list
  • Know how to access items in a list or dictionary

Decision structures:

  • Know how to write if, if-elif, and if-elif-else statements
  • Know how to interpret code that uses if, if-elif, and if-elif-else statements, including ifs inside of other ifs
  • Know how scope works: a variable declared inside an if cannot be seen if that if statement never executes


  • Know how to write while loops - checking for a condition and also for verifying user input
  • Know how to write for loops - both using range() and over a list

Study Hints

Practice coding on paper

You’ll be writing code on paper. This feels different than writing it in Eclipse. You don’t want to be surprised by how different it feels. Practice writing code by hand.

A few small syntax errors is OK. But if you are really off we will take off points. Try to write correct code.

We’ll give you any imports you might need - so don’t worry about memorizing those.

Try re-solving the POTD and Lab problems on paper without looking at your code or textbook.

You can find more sample problems in Programming Challenges in the textbook. We do not, however, have the answer key to share with you.

Also remember that speed matters. 50 minutes is not a long time.

Practice reading code

We will show you code and ask you what it does. You won’t be able to have Java run it. Practice thinking through code without running it.

Review the Lectures

Not everything in the book is equally important. Review the lecture notes to see what we emphasized. If you are confused by some point, check the audio. You might want to listen to the audio of the other instructor (the one you didn’t hear in class) so that you can get a different perspective on the material.