1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
dalvyx [7]
3 years ago
11

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

amount entered is less than the total cost of the two items, print a message that states how much is still owed. Otherwise, print a thank you message and state how much change will be given.
Computers and Technology
1 answer:
Rama09 [41]3 years ago
7 0

Answer:

first_item = float(input("Enter the cost of your first item: "))

second_item = float(input("Enter the cost of your second item: "))

total = first_item + second_item

payment = float(input("Enter the amount you will be paying: "))

if payment < total:

   print("You still owe: " + str(total - payment))

else:

   print("Thank you. You will receive " + str(payment - total))

Explanation:

- Get the item costs from the user

- Calculate the <em>total</em>

- Get the <em>payment</em> from the user

- Compare the <em>payment</em> and <em>total </em>and print the appropriate message

You might be interested in
Need help with this​
VladimirAG [237]

Answer:

Get out of coding asap

Explanation:

coding is really boring

4 0
3 years ago
Henry wants to create a presentation for his clients. He wants to upload the presentation file directly to the Internet. Which p
Ierofanga [76]

Answer:

styrofoam and petroleum

Explanation:

8 0
1 year ago
A technician is dispatch to troubleshoot a user's computer.
Margarita [4]

Answer:

All of the above.

Explanation:

Thrashing or drive or disk thrashing occurs when the hard drive is stressed with transferring information between the system memory and virtual machine excessively. In thrashing, there is a large number of processes running in the system and the system memory is too small to handle all processes. Thrashing leads to decreased system performance and hard disk failure.

To stop the impact of thrashing, install more RAM, end unimportant progam processes etc.

5 0
3 years ago
The spreadsheet below shows a list of fruits with their calorie count, grams of sugar, dietary fiber, and protein. Which set of
dangina [55]

Answer:

Filter Calories by over 100 calories, and sort Sugar in descending order.

Explanation:

4 0
2 years ago
What is the difference<br> difference between<br> Open<br> and recent<br> command?
Nostrana [21]
The difference between the new and open commands on the file menu are quite simple. The new command creates a brand new file, while the open command opens a file that already exists or has been created.
3 0
3 years ago
Other questions:
  • W jakim celu powstawały pieśni żołnierskie i partyzanckie?
    10·1 answer
  • Why are video texts an example of multimedia? A. They use audio and visual elements together. B. They use one type of medium to
    13·2 answers
  • Two students are discussing the flow of electricity. Student A says that voltage is a measure of the amount of electron flow in
    8·1 answer
  • Hi! I'm Kayla! I was wondering who does homework on the weekends... anybody?? I guess almost everyone, including me. Anyways, le
    13·2 answers
  • Number Array Class
    5·1 answer
  • Which PlayStation was the first to allow connection between it and computer network
    12·1 answer
  • What do you need for digital photography? 1. 2. 3.
    13·1 answer
  • Driswers.
    13·2 answers
  • What are the different alignment options available in Microsoft​
    11·2 answers
  • What does syntax error mean :-;<br>explain briefly.<br><br>thankyou!
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!