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

Create a program that compares the unit prices for two sizes of laundry detergent sold at a grocery store.

Computers and Technology
1 answer:
astraxan [27]3 years ago
4 0

Complete Question:

Create a program that compares the unit prices for two sizes of laundry detergent sold at a grocery store. Console Price Comparison Price of 64 oz size: 5.99 Price of 32 oz size: 3.50 Price per oz (64 oz): 0.09 Price per oz (32 oz): 0.11

Using Python

Answer:

<em>This program does not make use of comments (See explanation section)</em>

price64 = float(input("Price of 64 oz size: "))

price32 = float(input("Price of 32 oz size: "))

unit64 = price64/64

unit32 = price32/32

print("Unit price of 64 oz size: ", round(unit64,2))

print("Unit price of 32 oz size: ", round(unit32,2))

if unit64>unit32:

     print("Unit price of 64 oz is greater" )

else:

     print("Unit price of 32 oz is greater" )

Explanation:

This line prompts the user for the price of 64 oz size

price64 = float(input("Price of 64 oz size: "))

This line prompts the user for the price of 32 oz size

price32 = float(input("Price of 32 oz size: "))

This line calculates the unit price of 64 oz size

unit64 = price64/64

This line calculates the unit price of 32 oz size

unit32 = price32/32

This next two lines print the unit prices of both sizes

print("Unit price of 64 oz size: ", round(unit64,2))

print("Unit price of 32 oz size: ", round(unit32,2))

The next line compares the unit prices of both sizes

if unit64>unit32:

This line is executed if the unit price of 64 oz is greater than 32 oz

     print("Unit price of 64 oz is greater" )

else:

This line is executed, if otherwise

     print("Unit price of 32 oz is greater" )

You might be interested in
Availability is an essential part of ________ security, and user behavior analysis and application analysis provide the data nee
Alex777 [14]

Answer:

Network.

Explanation:

Availability is an essential part of network security, and user behavior analysis and application analysis provide the data needed to ensure that systems are available.

Availability in computer technology ensures that systems, applications, network connectivity and data are freely available to all authorized users when they need them to perform their daily routines or tasks. In order to make network systems available regularly, it is very essential and important to ensure that all software and hardware technical conflicts are always resolved as well as regular maintenance of the systems.

A network administrator can monitor the network traffics and unusual or unknown activities on the network through the user behavior analysis and data gathered from the application analysis to ensure the effective and efficient availability of systems.

8 0
3 years ago
Which genre of art is specific to digital media?
Tju [1.3M]
If I had to choose anything, it would be Graphic Design. Graphic design includes art digitally, right? I might be wrong-
4 0
3 years ago
Question 1
DaniilM [7]

Answer:

Explanation:

<u>Question 1:</u>

You don’t necessarily have to go out and purchase a brand new fuel-efficient car to save on gas. There is plenty you can do to increase your gas mileage.

<em>Replace Air Filter and Spark Plugs </em>

Replacing the air filter and spark plugs during a routine auto checkup not only helps your car last longer, but it can help your engine burn gas more efficiently

<em>Properly Inflate Tires </em>

Inflate the tires when they look low, but even if they are slightly low, undetectable to the eye, they could significantly reduce your mileage. Basically, under-inflated tires result in your engine using more gas to move the car.

<em>Use Cruise Control</em>

Using cruise control helps to maintain a safe, legal, and gas-efficient speed.Using cruise control helps reduce the need to accelerate and brake, which makes travel more gas-efficient.

<u>Question 2:</u>

Because younger drivers are more likely to get in a accident.

<u>Question 3:</u>

Laws regarding hazard light use are vague in many states, according to The American Automobile Association, in Virginia, “hazard light use is not permitted while driving except for emergency vehicles, stopped or slowed vehicles to indicate a traffic hazard, when traveling as part of a funeral procession.

<u>Question 4:</u>

Pull over at a safe location: If a police officer indicates for you to pull over, put on your turn signal to drive to the nearest, safe location and pull over. As such, turn off your ignition, turn on your interior car lights (if it's dark outside), and completely roll down your driver's side window.

5 0
3 years ago
Read 2 more answers
Which version of Windows was considered an operating environment rather than an operating system? Windows 1.0 Windows 3.0 Window
Goryan [66]
<span>1.0 Windows was considered an operating environment not an operating system</span><span />
6 0
3 years ago
Technician A says that a camshaft must open and close each valve at exactly the right time relative to piston position. Technici
morpeh [17]
On single and double overhead cam engines, the cams are driven by the crankshaft, via either a belt or chain called the timing belt or timing chain. These belts and chains need to be replaced or adjusted at regular intervals.
3 0
3 years ago
Other questions:
  • Most information security incidents will occur because of _________. Select one: a. Users who do not follow secure computing pra
    10·1 answer
  • ________ is a type of attack in which the attacker takes control of a session between two machines and masquerades as one of the
    5·1 answer
  • A Unit of information containing the objects position, rotation, and scale values is called:
    13·1 answer
  • Which is the most likely reason film companies expanded so quickly?
    8·1 answer
  • What is the ascii code for the letter D
    8·1 answer
  • which driver must be running and configured to enable a PC to communicate with a CompactLogix PLC on an Ethernet network
    10·1 answer
  • Write a program that creates a two-dimensional array named height and stores the following data:
    15·2 answers
  • Your development server is experiencing heavy load conditions. Upon investigating, you discover a single program using PID 9563
    5·1 answer
  • Explain in detail what it means to synchronize computers and mobile devices and include at least two strategies for keeping your
    8·1 answer
  • Components of document merging?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!