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]
4 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]4 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
A(n application system is the master controller for all the activities that take place within a computer system. _______________
Elenna [48]
The answer is b.false
3 0
3 years ago
The term "blog" is short for ____.
Tom [10]
The answer is B!
Hope this helps.
5 0
3 years ago
Technicans A says the engine camshaft converts reciprocating motion of the piston into rotary montion for power output. Technici
garri49 [273]

It doesn't say what Technician B thinks, but I can tell you what the camshaft does and then you can decide who is right on your own. The camshaft is little metal rounded triangles above the piston that times when the intake and exhaust valve open and close.

Technician A is very wrong, the camshaft doesn't do that.

6 0
4 years ago
What is it called when two different files generate the same hashing result?
IrinaK [193]
A Hash<span> Collision Attack is an attempt to find </span>two<span> input strings of a </span>hash<span> function that </span>produce the same hash result<span>. ... If </span>two separate<span> inputs </span>produce the same hash<span> output, it is </span>called<span> a collision. </span>
4 0
3 years ago
The direction of a ratchet is reversed by _______________________.
ankoles [38]

Answer:

You can reverse the direction of a ratchet by hitting with an equal or higher amount of force it came at you with.

Explanation:

6 0
2 years ago
Other questions:
  • As a safe driver, you cannot, __________
    13·1 answer
  • Why are fixed resistors’ values indicated by color bands rather than printing the numeric value on their exterior?
    13·1 answer
  • Keyshia now wants to remove the background of the image. She marks the areas she wants to keep and the areas she wants to remove
    13·2 answers
  • Give fields descriptive so that you can easily identify them when you view or edit records.
    13·1 answer
  • The proxy statement issued by a corporation is a requirement of: a. The Securities &amp; Exchange Commission (SEC) b. The Financ
    5·1 answer
  • How do i make a profile picture <br> REALLY URGENT I NEED IT NOW!!!
    8·2 answers
  • What will the following program display in the console?
    13·2 answers
  • Fortnight on sat 530-10 my name is TTV BTW laggking_12
    5·1 answer
  • What practice makes it virtually impossible to figure out the geographic location of a company?
    7·1 answer
  • Say yes if you hate edge2021?
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!