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
OverLord2011 [107]
3 years ago
14

A customer in a store is purchasing 5 items. Write a python program that asks for the price of each item and display the subtota

l of the sales tax to pay (assume 7 % ) then the Overall Total.
Computers and Technology
1 answer:
alex41 [277]3 years ago
6 0

Answer:

total = 0

for i in range(5):

 product = float(input())

 tax = product * 0.07

 print('Product price:',product)

 print('Product tax:',tax)

 print('----------------------')

 total += product+tax

print('Total:',total)

Explanation:

Step 1 variables definition

total = 0

Step 2 loop over quantity of products

for i in range(5):

Step 3 ask for price and calculate the tax

product = float(input())

tax = product * 0.07

Step 4 print the product total

 print('Product price:',product)

 print('Product tax:',tax)

 print('----------------------')

Step 5 print the general total

print('Total:',total)

You might be interested in
In python 3.17 LAB: Convert to dollars
krok68 [10]

To convert the inputs to dollars and cents, we make use of a combination of multiplication and addition.

The program written in Python where comments are used to explain each line is as follows:

<em />

<em>#This gets input for the number of quarters</em>

quarters = int(input("Quarters: "))

<em>#This gets input for the number of dimes</em>

dimes = int(input("Dimes: "))

<em>#This gets input for the number of nickels</em>

nickels= int(input("Nickels: "))

<em>#This gets input for the number of pennies</em>

pennies= int(input("Pennies: "))

<em>#This converts the amount to dollars and cents</em>

dollars = quarters * 0.25 + dimes * 0.10 + nickels * 0.05 + pennies * 0.01

<em>#This prints the amount to 2 decimal places</em>

print("Amount ${:.2f}".format(dollars))

Read more about Python programs at:

brainly.com/question/22841107

7 0
2 years ago
Visual-verbal synergy has nothing to do with text, but solely with images used in a design.
Ilia_Sergeevich [38]
I think it is true (A) 
3 0
3 years ago
Shop anywhere. Snap every receipt. Earn FREE gift cards! Sign up for Fetch with my code "DUEUY" and get 2,000 points when you sn
katovenus [111]

Answer:

mk

Explanation:

i think its DUEUY

4 0
3 years ago
This unit is used to print the picture on a paper
NeTakaya

Answer:a printer

Explanation:

It prints things

7 0
2 years ago
Typically, you need to score _____ or higher on an AP exam to receive college credit for the AP course in the subject tested by
ss7ja [257]

the answer is A). 3 or higher

7 0
3 years ago
Read 2 more answers
Other questions:
  • What OS is most commonly used by businesses? Linux Macintosh Microsoft Windows
    11·1 answer
  • A program that contains the following method: public static void display(int arg1, double arg2, char arg3) { System.out.println(
    15·1 answer
  • Which part of a computer takes the text and pictures on your screen and prints them onto paper?
    6·1 answer
  • What is my favorite color?<br> Red<br>Orange<br>Yellow<br>Blue <br>Gold<br>Silver
    13·1 answer
  • You are purchasing several PC systems that will be used as thin clients in a large organization. Which hardware selection criter
    9·1 answer
  • The linear programming ingredient or blending problem model allows one to include not only the cost of the resource, but also th
    14·1 answer
  • 5.During a recent network attack, a hacker used rainbow tables to guess network passwords. Which type of attack occurred
    9·1 answer
  • What is the biggest challenge for most business when going online?
    12·1 answer
  • Is it a way to get robuc 4 free
    6·2 answers
  • Would it be feasible to combine fixed length field and variable length field format in single disk
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!