Question: Write a Python program that prompts the user for the cost of two items to be purchased. Then prompt the user for their payment. If

Write a Python program that prompts the user for the cost of two items to be purchased. Then prompt the user for their payment. If they enter an amount that is less than the total cost of the two items, print a message that tells them how much they still owe. Otherwise, print a message that thanks them for their payment and tells them how much change they will receive. Thoroughly test your code for all possible input.

So far I have:

itemOne = float(input("Please enter the cost of your first item:$ "))

itemTwo = float(input("Please enter the cost of your second item:$ "))

total = itemOne + itemTwo

print("Your total is:$ ", total)

payment = float(input("Please enter the amount you will be paying with:$ "))

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!