Homework #5 Solution

$29.99 $18.99

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…

You’ll get a: . zip file solution

 

 
Categorys:
Tags:

Description

Rate this product

Tasks

For All Students

  1. From HW #2, do #3 using lists for item names and prices. This is the program that prints a receipt.
    1. Assume only 5 items and their respective prices.
    2. Create two blank lists: items & prices
    3. Use a FOR loop to INPUT and APPEND item names and respective prices to their respective lists.
    4. Use a FOR loop to print the items and prices.

For Graduate Students Only

  1. P6.32
    1. Do NOT create a function as the program directs. Do it the way we have been doing thus far.
    2. You will need to use two lists: prices & isPet.
    3. Use WHILE loop and INPUT statements to populate the lists with their respective elements. Use ENTER, not -1, as sentinel value.
  2. P6.33
    1. Do NOT create a function as the program directs. Do it the way we have been doing thus far.
    2. You will need to use two lists: sales & customers.
    3. 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].