Description
Tasks
For All Students
- From HW #2, do #3 using lists for item names and prices. This is the program that prints a receipt.
- Assume only 5 items and their respective prices.
- Create two blank lists: items & prices
- Use a FOR loop to INPUT and APPEND item names and respective prices to their respective lists.
- Use a FOR loop to print the items and prices.
For Graduate Students Only
- P6.32
- Do NOT create a function as the program directs. Do it the way we have been doing thus far.
- You will need to use two lists: prices & isPet.
- Use WHILE loop and INPUT statements to populate the lists with their respective elements. Use ENTER, not -1, as sentinel value.
- P6.33
- Do NOT create a function as the program directs. Do it the way we have been doing thus far.
- You will need to use two lists: sales & customers.
- Follow directions from the programs above.
What to Turn-In?
- A Word / PDF document
- Follow previously provided guidelines
What You Will Need to Do in #3 Above
- You will be able to find the maximum value in the sales list.
- Find its index using the method provided in the textbook.
- Once you know the index of the maximum sales, use that to determine the name of customer. For example, if the maximum price is prices[2], the corresponding customer is customers[2].