practice for week 2 assignment

# practice for week 2 assignment - The manager of the Super...

• Notes
• 4

This preview shows pages 1–3. Sign up to view the full content.

The manager of the Super Supermarket would like to be able to compute the unit price for products sold there. To do this, the program should input the name and price of an item and its weight in pounds and ounces. It should then determine and display the unit price (the price per ounce) of the item. Analysis Process : 1. Get user input unit price 2. Find room area (find unit price) input item name 3. Divide room area (input item name) find weight in pounds and ounces 4. Multiply gallons (input item price) 5. Prompt for ounces (determine price per ounce) prompt for ounces 6. Display total (display unit price per ounce) Process: 1. Get user input 2. Input item name 3. Input price of item (\$1000 for 1lb) 4. Divide price by ounces and pounds (1lb for \$1000 then 1oz. = \$62.5) 5. Prompt for number of ounces or pounds 6. Multiply the dividend unit price by number of oz. or lb. 7. Display total unit price per oz. or lb.

This preview has intentionally blurred sections. Sign up to view the full version.

Input: Input: Item name (coffee beans) Price (\$1000 per 100lb bag) Output: total_cost (real: > 0) Output: Total_cost (real: > 0) Design Main Module
This is the end of the preview. Sign up to access the rest of the document.
• Fall '10
• SCHAFFER
• Imperial units, United States customary units, Fluid ounce

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern