Question: Problem Description: Your weekly spending money is 50 dollars. On Monday you make buy 3 items: item 1 is 4 notebooks at $2.50 each item

Problem Description:

Your weekly spending money is 50 dollars. On Monday you make buy 3 items:

item 1 is 4 notebooks at $2.50 each item 2 is 2 packs of Ramen noodles for lunch at at $1.25each item 3 is 6 individual batteres at $0.75 each

Now, you know the total cost with tax can be calculated as:

purchasecost = (4*2.50 + 2*1.25 +6*0.75)*1.1

And your remaining funds will be

remaining funds = 50 - purchase cost

But now lets think about a receipt. On a receipt you have the number of each item, the price of each item and then the total of each item.

At the bottom of the receipt you then have the purchase total, the calculated tax and than how much you owe all together

Now, your job is to write a program that will allow you to en- ter the price of each item, and how many of the item you bought. It should then calculate the item total, display these three amounts. After all 3 items have been entered, it should display the full purchase amount and your change from the 50 dollar bill.

__________________________________________________

Pseudo code on the picture attached Problem Description: Your weekly spending money is 50 dollars. On Monday you

________________________

First 7 lines of pseudo code

prompt_price = " Please, enter the purchase price per unit " prompt_price += "This can range between 0.01 and 10.00 " prompt_price += "If this amount is 2 dollars and 50 cents enter --> 2.50 " prompt_price += "Enter price here-->"

prompt_units = " Please, enter the number of units " prompt_units += "This can range betweeen 1 and 99 " prompt_units += "If you have 15 units enter --> 15 " prompt_units += "Enter units here -->"

separator = " ******************************************************" print(separator)

price = eval(input(prompt_price)) units = eval(input(prompt_units)) total = price * units print(" You entered:", units, "units @", price, "each", "totaling", price*units)

print(separator)

1. Form prompt for price 2. Form prompt for units 3. price + Enter price 4. units Enter unit 5. add product to running total 6. echo to console along with item total 7. price Enter price 8. units Enter unit 9. add product to running total 10. echo to console along with item total 11. price

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!