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
(03.04 MC) While working in a group, two members are not getting along. You ask each one what is happening, and they both say th
solniwko [45]

Answer:

Agree upon the problem Brainstorm possible

Explanation:

7 0
3 years ago
Read 2 more answers
Which is considered to be the oldest form of social media? A. media-sharing sites B. location-based services C. social networkin
neonofarm [45]

Answer:

b location based services

Explanation:

:)

4 0
3 years ago
It is a single strand of metal capable of transmitting power or data from one area to<br> another
Lera25 [3.4K]

Answer: A wire

Explanation:

8 0
3 years ago
Anyone here codes? <br> C++, C#, Lua? Anything?
Travka [436]

Answer:

IxxyzjgzkgzjgKfzkg v

jvljcljxkhxkgg/gjhkggzkykzkgjzjgggggzjgcufxu

Explanation:

nk yxthzefhGghghrhgzxhhsdgchiixxu

7 0
3 years ago
Read 2 more answers
How do you open an application on the macOS?
timama [110]

Click the Launchpad icon in the Dock, or pinch closed with your thumb and three fingers on your trackpad. Then click an app to open it. You can also type an app's name to find the app in Launchpad, then press the Return key to open it.

3 0
3 years ago
Read 2 more answers
Other questions:
  • n the declaration: string color = "blue"; A. the string literal color is assigned to the string reference "blue" B. the string r
    11·2 answers
  • Andy uses a dial-up modem to connect to the Internet. He usually browses news sites, but he notices that online video takes a lo
    15·1 answer
  • A soldier white line down the center of a two lane road indicates
    5·1 answer
  • How does sugar dissolve in water ? &amp; Read Carefully ?
    9·1 answer
  • Cookies Are Us runs a series of 100 cookie stores across the Midwestern United States and central Canada. At the end of each day
    13·1 answer
  • What are the four steps of the research process?
    13·1 answer
  • What is the output of this program?
    10·2 answers
  • Assume that you have implemented a sequence class. Describe the mySequence object (i.e., items with the correct order and the po
    9·1 answer
  • ____ is Windows XP system service dispatch stubs to executables functions and internal support functions.
    13·1 answer
  • Which file types have exe and png as their extensions?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!