The following are the exercises for Chapter 5. The first:
And the second:
I don’t think I did these correctly. I mean, I did do them correctly in the sense that I accomplished the task layed out in the instructions, but I didn’t update the variable. I couldn’t for the life of me get it to work. Instead, I made a list, appended each user input to the list, then had the program perform the required calculations when the user entered done
. Setting that up was very straightforward, which leaves me perplexed at my inability to get the variable update to behave. Anyway, live and learn, right? I assume this is something I will have to figure out eventually, and I’ll get to the bottom of it. For the moment, though, the lists work great!