Date & Time
Wednesday, February 17, 2:00-3:15pm, Online (Blackboard)
Overview
Test 1 will cover all material from the beginning of the semester through string processing. This material includes everything discussed in lectures and covered in assignments, and aligns with chapters 1-6 and 8 from the recommended text. We have covered some additional topics the text has not, and we did not cover the data science additions to each chapter. Because this is a programming principles course, there will be questions related to principles as well as questions that involve syntax. You may be asked to write, analyze, and/or debug code.
Example Types of Free-Response Questions
- Given a block of code, how would you rewrite it to be more concise (or efficient)?
- Given a block of code, locate all errors and detail how you would fix them.
- What is the principle of “Don’t Repeat Yourself”? How does it make code more manageable?
- What are the conventions for identifiers in Python?
- Discuss the controversy surrounding the goto statement.
- Compare the loop-and-a-half, infinite-loop-break, and assignment-expression approaches for while loops.
- What are the similarities and differences between sequences and collections? Which python constructs fall into each category?
- What makes a list comprehension different from a generator?
- When is lazy evaluation more efficient than strict evaluation?
- Why would you justify rows of numbers to the right when printing them?
- Why are raw strings useful for regular expressions?