Test date: Wednesday, April 6, 2016
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: Tuesday, April 5, 5:00-6:00 PM in Chem 402
- The format of the test will largely match that of Test 1 - some short answer, some code reading, some multiple choice, and a large coding question at the end.
- Everything from the first part of the semester is still fair game. It’s hard to ask a coding question without you still knowing how to do an
ifstatement, for instance.
Not on the Test:
- Specifics of the encryption chase
- You WILL be asked to write functions on this test
- Know what the function header / signature is
- Know the difference between a void return and a function that returns a data type of some kind (and when you would use each)
- Know what named / optional parameters are and how they are used
- Know what positional parameters are and that they must come first in a function call
- Know the difference between pass by value and pass by reference
- Know how to read structured files (i.e. csv) from a local file or the Internet
- Know how to write data to a file
- Know some of the basic methods for parsing strings (
- Know what regular expressions are, how to read a simple one, and when you might use them (but we will not ask you to write a regular expression)
- Know what BeautifulSoup does and when you would use it (but we will not ask you to use it in any code on the test)
Here are some problems you can practice with (however, we do not have the solutions available - you can probably Google for them):
Chapter 5 (p. 229): 11, 12, 13, 17, 20 Chapter 6 (p. 288): 1, 2, 4, 6 Chapter 8 (p. 366): 6, 7, 9, 10
Practice coding on paper
You’ll be writing code on paper. This feels different than writing it in PyCharm. 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. 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.