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
Tanzania [10]
3 years ago
5

Choose the best data type for each of the following so that any reasonable value is accommodated but no memory storage is wasted

. Give an example of a typical value that would be held by the variable, and explain why you chose the type you did.
a. the number of siblings you have

b. your final grade in this class

c. the population of Earth

d. the population of a U.S. county

e. the number of passengers on a bus

f. one player's score in a Scrabble game

g. one team's score in a Major League Baseball game

h. the year an historical event occurred

i. the number of legs on an animal

j. the price of an automobile
Engineering
1 answer:
stiks02 [169]3 years ago
3 0

Answer:

Explanation:

Part (a):

Statement : The number of siblings you have

Suitable Data type : Byte

Typical Value : From -128 and up to 127

Explanation: Byte data type is the most suitable since it can covers minimum and maximum number of siblings one can have.

Part (b):

Statement : Your final grade in this class

Suitable Data type : Char

Typical Value : 1 byte

Explanation: Grades is in the form of alphabetical letter which is either A, B, C, D, F or E which can be stored in character data type.

Part (c):

Statement : Population of Earth

Suitable Data type : Long

Maximum Value : 9223372036854775807

Explanation: Long Data takes up to 8 bytes and can store up to 9223372036854775807 which can cater for more than 36 billion. The population of earth is only around 7 billion currently making Long data type the most suitable data type to store earth population.

Part (d):

Statement : Population of US Country

Suitable Data type : Integer

Typical Value :2147483647

Explanation: Integer data type takes up to 4 bytes and can store up to  2147483647 making it suitable to store U.S population.

Part (e):

Statement : The number of passengers on bus

Suitable Data type : Byte

Typical Value :From -128 up to 127

Explanation: The typical maximum number of passengers of a bus are only around 72. Byte data type is the most suitable since it can cater the number up to 127.

Part (f):

Statement : Player's score in a Scrabble game

Suitable Data type : Short

Typical Value : 32767

Explanation: The maximum point can be scored in the Scrabble game is only 830 therefore the most suitable data type for this case is the short data type.

Part (g):

Statement : One team's score in a Major League Baseball game

Suitable Data type : Byte

Typical Value : From -128 up to 127

Explanation: The maximum point can be scored in the Base ball game is only 49 therefore the most suitable data type for this case is the Byte data type since it can cater up to 127.

Part (h):

Statement : The year an historical event occurred

Suitable Data type : Short

Maximum Value: 32767

Explanation: The historic event year can be any number from 1 to 2020 therefore the most suitable data type is the short data type.

Part (i):

Statement : The number of legs on an animal

Suitable Data type : Short

Maximum Value: 32767

Explanation: The most number of legs found are 750 legs therefore the most suitable data type is the short data type which can cater up to 32767.

Part (j):

Statement : The Price of an automobile

Suitable Data type : Float

Maximum Value: 340282350

Explanation: The most expensive car is around 15 million therefore the most suitable data type is the float data type which can cater up to 340 million.  

You might be interested in
If you want to obtain a Class E license before you turn 18, you must______. A. be in compliance with school attendance requireme
Makovka662 [10]

Answer:

The correct option is;

A. be in compliance with school attendance requirements

Explanation:

The requirements to acquire a special restricted driver's license for driver's license for under under 18 that have had a beginner's for up to 180 days include a minimum of 40 hours driving practice 10 of which should be in the dark. The application for the conditional drivers license is to be signed by the parent or guardian and the application is to be accompanied with proof of acceptable school attendance

At 17, after holding the special restricted drivers licence for a year without issues you can obtain the full drivers license.

7 0
3 years ago
What happens to battery when it produces current to the system
olasank [31]

Answer:

Electricity, as you probably already know, is the flow of electrons through a conductive path like a wire. This path is called a circuit. ... The chemical reactions in the battery causes a build up of electrons at the anode. This results in an electrical difference between the anode and the cathode

3 0
3 years ago
Plssssssssssssss Alexi is writing a program which prompts users to enter their age. Which function should she use?
aleksandr82 [10.1K]

Answer:

int()

Explanation:

float() is using decimals, so that can't be it, like float(input( "how much does this cost?"))

print() is used to print something, not a user asking, like print("hello")

string() means like a whole, like string( I am good)

By elimination, int() is correct.

Hope this helps!

7 0
2 years ago
X cotx expansion using maclaurins theorem.
Lemur [1.5K]

It is to be noted that it is impossible to find the Maclaurin Expansion for F(x) = cotx.

<h3>What is Maclaurin Expansion?</h3>

The Maclaurin Expansion is a Taylor series that has been expanded around the reference point zero and has the formula f(x)=f(0)+f′. (0) 1! x+f″ (0) 2! x2+⋯+f[n](0)n!

<h3>What is the explanation for the above?</h3>

as indicated above, the Maclaurin infinite series expansion is given as:

F(x)=f(0)+f′. (0) 1! x+f″ (0) 2! x2+⋯+f[n](0)n!

If F(0) = Cot 0

F(0) = ∝ = 1/0

This is not definitive,

Hence, it is impossible to find the Maclaurin infinite series expansion for F(x) = cotx.

Learn more about Maclaurin Expansion at;
brainly.com/question/7846182
#SPJ1

4 0
2 years ago
Jodie bought some shirts for 6$ each marge brought some shirts for 8$ each
Alex_Xolod [135]

Answer:

you need more details but if you have to find the difference, its $2.00

Explanation:

8-6=2

3 0
3 years ago
Other questions:
  • An air-standard Otto cycle has a compression ratio of 6 and the temperature and pressure at the beginning of the compression pro
    13·1 answer
  • After being purged with nitrogen, a low-pressure tank used to store flammable liquids is at a total pressure of 0.03 psig. (a) I
    13·1 answer
  • The gas-turbine cycle of a combined gas–steam power plant has a pressure ratio of 8. Air enters the compressor at 290 K and the
    15·1 answer
  • A preheater involves the use of condensing steam at 100o C on the inside of a bank of tubes to heat air that enters at I atm and
    14·1 answer
  • Determine the force in members FD and DB of the frame. Also, find the horizontal and vertical components of reaction the pin at
    15·1 answer
  • How many steps are there in the problem-solving process?
    9·2 answers
  • What three training organizations are important for Union Masons?
    14·1 answer
  • A solid steel shaft ABCDE turns freely in bearings at points A and E. The shaft is driven by the gear at C, which applies a torq
    14·1 answer
  • How can input from multiple individuals improve design solutions for problems that occur because of a natural disaster, such as
    5·1 answer
  • You have three gear wheels a, b and c connected to each other,if you turn the first gear wheel "a" clockwise what will happen to
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!