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
Page 1. I who invented computer?​
svetoff [14.1K]
Charles baggage (picture for more info)

4 0
2 years ago
Which of the following is not a basic role of a webmaster
Natalija [7]
Out of the following, the only one that I see is not the basic role of a webmaster is replying to customers questions about the web site! Usually they have a specific job for that; like customer service etc. Hopefully that helps.
5 0
3 years ago
Initialize a list. ACTIVITY Initialize the list short.names with strings 'Gus', Bob, and 'Ann'. Sample output for the given prog
Ksenya-84 [330]

Answer:

shortNames = ['Gus', 'Bob','Zoe']

Explanation:

In this assignment, your knowledge of list is been tested. A list is data structure type in python that can hold different elements (items) of different type. The general syntax of a list is

listName = [item1, "item2", item3]

listName refers to the name of the list variable, this is followed by a pair of square brackets, inside the square brackets we have items separated by commas. This is a declaration and initialization of a list with some elements.

The complete python code snippet for this assignment is given below:

<em>shortNames = ['Gus', 'Bob','Zoe']</em>

<em>print(shortNames[0])</em>

<em>print(shortNames[1])</em>

<em>print(shortNames[2])</em>

3 0
3 years ago
In statistics the mode of a set of values is the value that occurs most often. Write a program that determines how many pieces o
Feliz [49]

Answer:

  see below

Explanation:

The program of interest is the function "findMode[x, n]" in the attached. It is written the Wolfram Language of Mathematica.

The basic idea is that the data in the array is sorted. The sorted array is partitioned into sets of identical elements, and the number in each of those sets is counted. The maximum of those counts is the mode. The location of the maximum count corresponds to the location of the set having that count. We use that location information to pull out the mode value(s).

If there is more than one mode, all are reported.

__

An example data array is provided, along with the program output.

6 0
3 years ago
Prove that any amount of postage greater than or equal to 64 cents can be obtained using only 5-cent and 17-cent stamps?
elixir [45]
Let P(n) be "a postage of n cents can be formed using 5-cent and 17-cent stamps if n is greater than 63".Basis step: P(64) is true since 64 cents postage can be formed with one 5-cent and one 17-cent stamp.Inductive step: Assume that P(n) is true, that is, postage of n cents can be formed using 5-cent and 17-cent stamps. We will show how to form postage of n + 1 cents. By the inductive hypothesis postage of n cents can be formed using 5-cent and 17-cent stamps. If this included a 17-cent stamp, replace this 17-cent stamp with two 5-cent stamps to obtain n + 1 cents postage. Otherwise, only 5-cent stamps were used and n  65. Hence there are at least three 5-cent stamps forming n cents. Remove three of these 5-cent stamps and replace them with two 17-cent stamps to obtain n + 1 cents postage.Hence P(n + 1) is true.
6 0
3 years ago
Other questions:
  • Your friend sees an error message during Windows startup about a corrupted bootmgr file. He has another computer with a matching
    12·1 answer
  • A(n) ____ is the computer counterpart to an ordinary paper file you might keep in a file cabinet or an accounting ledger.a. data
    6·1 answer
  • Why is printer an output device​
    14·2 answers
  • All of the Internet in your country disappears. What happens next?
    13·1 answer
  • Speeding is one of the most prevalent factors contributing to traffic crashes.
    12·1 answer
  • Ryan is looking to buy a new HDTV set. He knows from friends that LCD set screens reflect less light than plasma set screens, bu
    10·1 answer
  • As a prospective student, what is the best reason to request an interview with your college application?
    6·1 answer
  • A ______ is a portable device for recording audio and video.
    10·2 answers
  • Write a java code to print Multiplication Table Till 20
    14·2 answers
  • The three main objectives of information security are.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!