Week 7
Practice

Practice Materials

 

Parsons Problems

Chapter 3 didn't add enough to add new code practice. So the following problems were created by me and use a specialized Parsons Problem website. They are provided to give you some additional practice on the material from Chapter 2 while focusing more on the IPO format we are emphasizing this week..

  1. Bob's Burgers Cash Register
  2. Converting Minutes to Hours and Minutes
  3. Change from a parking lot vending machine
  4. Converting dollars to Euros

"Solutions" for these four programs are included in the Code Walkthrough section below.

 

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.

  1. Calculating the final cost with tax

The solution for this program is included in the Code Walkthrough section below.

 

(Paired) Practice Programs

 

Additional Textbook Activities

  • 2.17. Write Code Questions
    • Unlike the materials in Section 2.16 (that you used last week) these can't be toggled back and forth between Parsons Problems or Write Code problems.
    • Instead, these are some additional (and completely optional) opportunities to practice writing code.

 

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.