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
Using complete sentences post a detailed response to the following.
KatRina [158]

Answer:A couple disadvantaged are the migraines that is can cause. And it can cause eye strain there are alot of things that could hurt your eyes. Like being in virtual reality for to long. It can very rarely make you go blind.

Explanation: sorry if its wrong

8 0
2 years ago
here are pros and cons for doing temp work. Please select the best answer from the choices provided T F
Brut [27]

Answer:

Hello! the answer should be true, I hope i got here in time.  

Explanation:

6 0
2 years ago
Read 2 more answers
Graded Assignments may be found at the end of each chapter of the required textbook under the title "Real-World Exercises". Each
mina [271]
Ok chapter 2 be done by 11:59
5 0
3 years ago
C++
Nookie1986 [14]

Answer:

Following are the code to the given question:

#include <iostream>//header file

using namespace std;

class Window //defining a class Window

{

private:

int width, height;//defining integer variable

public:

friend ostream& operator << (ostream& stm, Window& width)//defining a friend function that takes two parameters

{

return stm<<"a ("<<width.width<<" x "<<width.height<<") window"; //use return keyword that return its values

}  

Window(int width, int height): width(width), height(height)//defining parameterized constructor that inherit width and height in its parameters  

{}

};

int main() //Main method

{

Window w(80,90);//calling class constructor

cout<<w;//print object value

return 0;

}

Output:

a (80 x 90) window

Explanation:

In the above code, a class "Window" is defined that uses a friend function "ostream& operator" is declared that uses the "ostrea&" as a data type to hold two-variable "stm and w" in its parameter, and declared the parameterized constructor to hold value by inheriting width and height in its parameters.

Inside the main method, a class object is created that calls the constructor and uses the print method to print object value.

7 0
3 years ago
Write a loop that continually asks the user what food the user has in their refrigerator until the user enters apples, in which
almond37 [142]

(Disclaimer: I am not a professional, so it might not be the most concise answer possible, but I did run the Python script and it works)

Answer:

user_input = input("What food do you have in your refrigerator? ").lower()

count = 0

while True:

   if user_input != 'apples':

       count += 1

       print(f'You have a {user_input} with a total of {count} food(s)\n')

       user_input = input("What food do you have in your refrigerator? ")

   else:

       break

7 0
2 years ago
Other questions:
  • Which of the following is a rule of thumb for cell phones or smartphone etiquette ?
    12·1 answer
  • Which is an internet service?<br><br> Antivirus<br> Chat<br> Firewall<br> Router
    8·2 answers
  • Suppose barriers to entry exist in the telecommunications industry. This best describes a _____ market.
    12·1 answer
  • "Which of the following is not an example of a project? Select one: a. Creating a website for a company b. Raising money for a d
    5·1 answer
  • Consider the following schema for customer: (id, name, street, city, state, zip, phone), in which customers are uniquely determi
    10·1 answer
  • The area surrounding your car that can't be seen from the driver's seat is called
    14·2 answers
  • Rule number one for handling an emergency is to _____. A. buy a new vehicle B. call law enforcement C. remain calm D. restart th
    6·2 answers
  • How does a film establish the setting?
    14·1 answer
  • I need help fixing this please
    6·2 answers
  • Pls help help me is good help me helping is very good
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!