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
trasher [3.6K]
3 years ago
8

Label the strength of a beer based on its ABV. For each beer display the beer's name, ABV, and a textual label describing the st

rength of the beer. The label should be "Very High" for an ABV more than 10, "High" for an ABV of 6 to 10, "Average" for an ABV of 3 to 6, and "Low" for an ABV less than 3. Show the records by beer name.
Computers and Technology
1 answer:
belka [17]3 years ago
5 0

Answer:

By presuming the question expect us to write a program to address the problem and the solution code written in Python is as follow:

  1. beer_name = input("Enter beer name: ")
  2. abv = int(input("Enter ABV value: "))
  3. if(abv > 10):
  4.    label = "Very High"
  5. elif(abv >=6):
  6.    label = "High"
  7. elif(abv >=3):
  8.    label = "Average"
  9. else:
  10.    label = "Low"
  11. print("Beer Name: " + beer_name)
  12. print("ABV value: " + str(abv))
  13. print(label)

Explanation:

Firstly, we can use input function to prompt user to input beer name and ABV value (Line 1 - 2).

Next, create if else if statements to check abv fallen into which range of value and then set a label accordingly (Line 4 -11). For example if abv is 4, the label will be set to "Average".

At last, print the information of beer that includes beer name, abv value and label (Line 13 - 15).

You might be interested in
Professor Midas drives an automobile from Newark to Reno along Interstate 80. His car’s gas tank, when full, holds enough gas
zmey [24]

Answer:

The GREEDY Algorithm

Explanation:

Based on the situation given in question, the Greedy algorithm shall give the optimal solution to professor

Suppose that the cities are at locations0 =x0< x1< . . . < x

We shall use the induction method to prove that G is the optimal solution valid for numbers less than n

We assume another solution Z which we initially consider to be optimum as well, based on that when Z fills the tank, it fills it to full level

Let us state the values in case of n intervals. Given below, we say that g1 is the first stop and z1 is also the first stop.

This can be written as ;

G=g1, g2, . . . , gk

Z=z1, z2, . . . , zk’

Here k’ <= k and k < n

Let I be an idex where for the first time gi is not equal to zi

Considering t= maxi Zi

Z′=g1, z2, z3, . . . , zk′

Now since z2, z3, . . . , zk′ should be an optimal stopping pattern for the problem otherwise we have chosen Z, with smaller gas filling (not feasible)

Using induction hypothesis we conclude thatg2, . . . , gk is an optimal stopping pattern, which is based on greedy algorithm

7 0
3 years ago
What is the use of consonant in QBASIC ? Answer me in short and easy answer.​
Digiron [165]

Answer:

See Explanation

Explanation:

I'll assume the question is about the use of constants in QBasic because consonants do not have any special function or usage in QBasic.

In simple terms: In QBasic, constants are used to represent elements that do not change in value during program execution.

Take for instance, you intend to use \pi in your program.

Its value is \pi = 3.142

So, 3.142 will always be a constant in your program. One of the ways it can be used in a program is:

10 LET PI = 3.142

<em>The above represents a numeric constant. QBasic also have string constants.</em>

3 0
3 years ago
In this lab, 172.30.0.0 represents the __________ network and 10.20.1.0 represents the _________ network.
umka21 [38]
172.30.0.0: private network
10.20.1.0: public network
6 0
3 years ago
Identify the selector in the following CSS code:
SashulF [63]

Answer:

The right answer is: Option A. h3

Explanation:

The purpose of using selectors in CSS is to find the elements in the HTML page to which the formatting will be applied.

Different type of selectors are used in CSS.

In the given code, h3 is the selector.

All the <h3> elements on the page will be of orange color and will have font size 12.

Hence,

The right answer is: Option A. h3

6 0
3 years ago
Microsoft acknowledged that if you type a res:// url (a microsoft-devised type of url) which is longer than ____ characters in i
cluponka [151]
Which is longer than 20 characters
5 0
3 years ago
Other questions:
  • Does any body like animal jam
    11·2 answers
  • Computer virus is a<br> a. software<br> b. hardware<br> c. bacteria<br> d. none of these
    13·1 answer
  • Which resource helps a user access a cloud service?
    8·1 answer
  • The computer addicts are conscious about their addiction. True or false
    9·1 answer
  • A computer record is used to store all the information about one transaction, but several such records must be used to store the
    12·1 answer
  • When replacing a thermostat or water pump, coolant drained from the cooling system should be ________.
    9·1 answer
  • You need to extract data from the system your predecessor created. you discover tables have been created according to the third
    7·1 answer
  • Multiply each element in origList with the corresponding value in offsetAmount. Print each product followed by a semicolon (no s
    15·1 answer
  • Is a biometric system an input, output, storage or soft device?​
    6·1 answer
  • Explain ONE negative outcomes of not matching an ICT product to the correct audience:
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!