Week 8
Practice
Practice Materials
Parsons Problems
These problems present the complete code for a program, but in a mixed-up order. Your task is to arrange the pieces correctly to "write" the described program. These problems are a great first step in learning because they allow you to focus on the semantics of programming rather than the syntax.
- 4.12. Mixed-up Code Questions
- Problem 1
- Problem 2
- Problem 3
- Problem 4
"Solutions" for these four programs are included in the Code Walkthrough section below.
You are welcome to complete additional problems from this section.
Debugging Problems
Fixing programs that are "almost" correct but not yet functional is a crucial skill. As teachers, we often assume students will develop this skill by debugging their own work. However, it can be beneficial to provide explicit practice in debugging. The following problem is designed to give you semi-guided practice in debugging.
The solution for this program is included in the Code Walkthrough section below.
(Paired) Practice Programs
Each week, I will provide you with several practice programs (non-graded) that I encourage you to attempt, with your partner, before tackling the graded assignments.
Additional Textbook Activities
These are great for some additional practice. You should complete these on your own rather than with a partner.
- 4.11. Multiple Choice Questions
- 4.12. Mixed-up Code Questions
- Remember that you can change them from Parsons Problems to Active Write Code.
- 4.13. Write Code Questions (1-3 and 5-8)
Code Walkthroughs
The following are videos and code solutions explaining the problems above, including the Parsons Problems, Debugging Problems, and (Paired) Programming Activity. You SHOULD NOT view these until you have either solved the activities yourself and want to see how I would do it, or you have tried at least twice and are still stumped.
Don’t jump to the "correct answer" too quickly. It’s beneficial to struggle with a problem for a day or two. We improve when we meet and overcome resistance. Learning comes from practice, so make sure to TRY before jumping to the solutions.
- Parsons Problem 1 - 4.12.1
- Parsons Problem 2 - 4.12.2
- Parsons Problem 3 - 4.12.3
- Parsons Problem 4 - 4.12.4
- Debugging Problem 1 - Bad Odd or Even
- Pair Practice 1
- Using Nested Conditionals
- Using Chained Conditionals
- Pair Practice 2 - Is this QB having a good year?
- Pair Practice 3 - Chinese Zodiac
- Pair Practice 4 - Da Binz Store