lab04 : Conditionals, nested control structures, and loops

num ready? description assigned due
lab04 true Conditionals, nested control structures, and loops Mon 05/06 08:00AM Sun 05/12 11:59PM

THIS LAB IS DUE ON Sunday, May 12th BY 11:59 PM!

In this lab, you’ll get more practice with:

This lab is done in pairs.

Before you begin working on the lab, get your paired partner’s name from you lab T.A.

A reminder about working with a pair programming partner:

Once you and your partner are in agreement, choose an initial driver and navigator, and have the driver log into their account.

Instructions

In this lab, you will need to create two files:

Starter code is provided for you and are located at (you may need to refresh the page if the links do not load immediately):

You will complete the portions in the starter code by doing the following:

  1. Create a directory called ~/cs8/lab04 (using the mkdir command) and cd into that directory.
  2. Use idle3 (you might try idle3 & if you want to be able to type commands on your terminal window after IDLE opens).
  3. Use “New File” to create empty files called lab04.py and lab04_tests.py in that ~/cs8/lab04 directory.
  4. ONE AT A TIME, copy the function definitions from the starter code, and the tests that go along with those functions, and get the tests to pass. READ THE COMMENTARY CAREFULLY IN THE STARTER CODE: This will give you all the clues that you need to finish writing the code.
    • By one a a time, what I mean is, at your first step, copy ONLY the first function definition from the starter code lab04.py and copy only the import statements and test cases from lab04_tests.py that go with that function definition.
    • Then, before you move on to the next function definition and its tests, get all of the tests from the one you just copied to pass.
    • Then, and only then, copy the next function definition and its tests into your files.
    • Repeat this until you have ALL of the function definitions and their tests, and all of them pass.

You are encouraged to try submitting to Gradescope periodically for several reasons:

Upload lab04.py and lab04_tests.py to Gradescope.

Once you’re done with writing your functions, navigate to the Lab assignment “Lab04” on Gradescope and upload your lab04.py and lab04_tests.py files. Remember to add your partner to Groups Members for this submission on Gradescope. At this point, it is a good idea for both partners to log into Gradescope and see if you can see the uploaded files for Lab04.