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
julsineya [31]
3 years ago
15

Create a simple self-checkout system. Prompt for the prices and quantities of three items. Calculate the subtotal of the items.

Then calculate the tax using a tax rate of 6.5%. Print out the line items with the quantity and total, and then print out the subtotal, tax amount, and total.
Computers and Technology
1 answer:
navik [9.2K]3 years ago
8 0

Answer:

subtotal = 0

total = 0

tax_rate = 6.5

for i in range(1,4):

   price = float(input("Enter the price for item " + str(i) + ": "))

   quantity = int(input("Enter the quantity for item " + str(i) + ": "))

   subtotal += (price * quantity)

tax = subtotal * tax_rate/100

total = tax + subtotal

print("Subtotal: " + str(subtotal) + ", Tax: " + str(tax) + ", Total: " + str(total))

Explanation:

- Initialize the variables

- Create for loop that iterates 3 times

- Ask the user for the price and quantity of each item

- Calculate the subtotal with given inputs

- When the loop is done, calculate the tax and total

- Print the subtotal, tax, and total

You might be interested in
A user purchased a new smart home device with embedded software and connected the device to a home network. The user then regist
Rzqust [24]

Answer:

C. The user is sent an e-mail appearing to be from the manufacturer, asking the user to confirm account password by clicking on a link in the e-mail and entering password on the resulting page.

Explanation:

Phishing attack is a cyber atttack in which user is sent an email which he thinks is useful. When the user open the email and does as instructed in the email his account gets locked. His personal information is haccked and then rannsom is demanded to release that information. The hacckers usually steal credit card information and bank details of the user which are misused.

7 0
4 years ago
write a single expression that will return true if the lower four bits of x are the same as the lower four bits of y
horrorfan [7]

A single expression that will return true if the lower four bits of x are the same as the lower four bits of y is; (x & 0x0F) == (y & 0x0F)

<h3>How do you write single expression programs?</h3>

There are different methods of writing programs such as python and others. However, in this case, it is pertinent to know that this compiler that will return true if the lower four bits of x are the same as the lower four bits of y doesn't accept binary constants and as such we will use hexidecimal instead. For example; for 0b00111111, we will use 0x3F.]

Thus, using that same concept above, the single expression that will return true if the lower four bits of x are the same as the lower four bits of y is; (x & 0x0F) == (y & 0x0F)

Read more about writing computer programs at: brainly.com/question/16397886

6 0
2 years ago
A general-use dimmer switch is required to be counted as ? where installed in a single-gang box on a circuit wired with 12 awg c
aleksandrvk [35]

Answer:

2 conductors.

Explanation:

A dimmer switch is an electrical switching or control device used to control the power or voltage to a compatible dimmer bulb.

It reduces the ambience if light bulbs by uniformly increasing the resistance of the switch when the knob is rotated to a lesser point. It is a circuit breaker as two conductors are connected to its terminals and a variable voltage resistor determines the flow of current between them.

3 0
4 years ago
Which of the last step in conducting a URL search
kipiarov [429]
The user's browser renders the html code as a visual web page. A web page that we commonly see is structured by a bunch of 1 and 0. Rendering process allow the machine to interpret that 1 and 0 into the visual that we currently seeing Hope this helps. Let me know if you need additional help!
6 0
3 years ago
What are the TV resolutions
Leokris [45]
Numbers like 1080p and 4K refer to a TV's<span> screen </span>resolution and<span> the more pixels a screen has the more picture detail it can show.</span>
6 0
3 years ago
Other questions:
  • Which option represents the location of the Data Table function?
    12·1 answer
  • As a graphic designer, you'll refer to a line as which of the following? A. Point B. Border C. Rule D. Frame
    9·2 answers
  • Which of these practices should you follow while creating your résumé?
    14·1 answer
  • What means can a worm use to access remote systems to propagate?
    7·1 answer
  • What includes two or more private, public, or community clouds, but each cloud remains separate and is only linked by technology
    11·1 answer
  • Why when I move stuff in Roblox Studio like an object or a Character. It tilts the opposite direction I'm moving it to with the
    6·2 answers
  • What will be displayed if the following Java code segment is run? System.out.println("one "); System.out.print("two "); System.o
    12·1 answer
  • Select the correct answer from each drop-down menu.
    6·2 answers
  • An author is preparing to send their book to a publisher as an email attachment. The file on their computer is 1000 bytes. When
    8·1 answer
  • Which of the following algorithms is the same as the flowchart shown below?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!