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
Artificial intelligence (AI) and machine learning are especially important during which security information and event managemen
Juli2301 [7.4K]

Answer:

hueiweke

Explanation:

5 0
2 years ago
Write a Python function that join the two string and print it ​
liubo4ka [24]

Answer:

string1 = "this is string 1"

string2 = " this is string 2"

print(string1 + string2)

Explanation:

the string1 variable is assigned with a string value(aka. str)

string2 is also a variable assigned with a slightly different string value

the 3rd line then prints string 1 and 2 to the console.

5 0
2 years ago
Read 2 more answers
Colleen has been missing a lot of work. She often calls in right as her shift is starting with some excuse about why she
yanalaym [24]
She is not showing honesty
5 0
2 years ago
Read 2 more answers
All of the following are types of data storage devices except CD/DVD computer monitor digital cameras flash drive
horrorfan [7]

Computer Monitors are not storage devices.

3 0
3 years ago
Jack is writing a paragraph for a school assignment. He proofreads his paper and notices that he used the word, "then" many time
Lynna [10]

He should use a Thesaurus.

5 0
3 years ago
Read 2 more answers
Other questions:
  • _____________ is the characteristic of a resource that ensures that access is restricted to only permitted users, applications,
    14·1 answer
  • A word processing program would probably be used to: 
    8·1 answer
  • _______ view focuses on the text and content of a document, without much information on the page layout.
    7·1 answer
  • If you need assistance with your I-20 which phone number at UC would you call?
    10·1 answer
  • On most desktop computers, most of the USB ports are on the back of the computer case. Generally, you'll want to connect your mo
    13·1 answer
  • Your desktop, internet explorer, and the media player can be started from this area on most computers
    9·1 answer
  • Presently we can solve problem instances of size 30 in 1 minute using algorithm A, which is a algorithm. On the other hand, we w
    8·1 answer
  • What is a benefit of naming cells and ranges?
    8·2 answers
  • A human interest story is an example of hard news.<br> O True<br> O False HEL
    15·1 answer
  • What are the characteristics of the sorting and grouping options in Outlook? Check all that apply. Columns can be sorted by clic
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!