Answer:
int age = 10;
switch (age){
case 0:
case 1:
System.out.println("ineligible");
break;
case 2:
System.out.println("toddler");
break;
case 3:
case 4:
case 5:
System.out.println("early childhood");
break;
case 6:
case 7:
System.out.println("young reader");
break;
case 8:
case 9:
case 10:
System.out.println("elementary");
break;
case 11:
case 12:
System.out.println("middle");
break;
case 13:
System.out.println("impossible");
break;
case 14:
case 15:
case 16:
System.out.println("high school");
break;
case 17:
case 18:
System.out.println("scholar");
break;
default:
System.out.println("ineligible");
}
Explanation:
In java and many other programming languages, a switch statement is a way of having multiple branching options in a program. This is usually considered a more efficient way than using multiple if....else if statements. and the expression variables could be byte, char int primitive data types. etc. every branch (option) in a switch statement is followed by the break statement to prevent the code from "falling through". In the question The variable age is declared as an int and initialized to 10. and tested against the conditions given in the question.
Answer:
- import math
-
- def standard_deviation(aList):
- sum = 0
- for x in aList:
- sum += x
-
- mean = sum / float(len(aList))
-
- sumDe = 0
-
- for x in aList:
- sumDe += (x - mean) * (x - mean)
-
- variance = sumDe / float(len(aList))
- SD = math.sqrt(variance)
-
- return SD
-
- print(standard_deviation([3,6, 7, 9, 12, 17]))
Explanation:
The solution code is written in Python 3.
Firstly, we need to import math module (Line 1).
Next, create a function standard_deviation that takes one input parameter, which is a list (Line 3). In the function, calculate the mean for the value in the input list (Line 4-8). Next, use the mean to calculate the variance (Line 10-15). Next, use sqrt method from math module to get the square root of variance and this will result in standard deviation (Line 16). At last, return the standard deviation (Line 18).
We can test the function using a sample list (Line 20) and we shall get 4.509249752822894
If we pass an empty list, a ZeroDivisionError exception will be raised.
Override only
Reason because the same method speak is in the parent and child class
The type of attack that the hacker performed is Domain Name System (DNS) server cache poisoning.
<h3>What is DNS poisoning?</h3>
In Domain Name System (DNS) server cache poisoning, the hackers often enter into a DNS server because they want to make an adjustment to its directory so that it can point the domain name users enter to a wrong, IP address.
Note that Domain Name Server (DNS) poisoning is a form of system attack in which there is the change of DNS records which are then used to redirect online traffic to a wrong website.
Learn more about hacker from
brainly.com/question/24956493
Answer:
Normalization of storage is a typical method of storing the floating point number by shifting the decimal after the first figure of the number such as 1101.101 is normalized to 1.101101x23.
If the number that is in hovering point representation has 1 sign bit, 3-bit exponent with a 4-bit significant:
whenever the storage is normalized, then the biggest positive floating spot number in 2`s and the complement notation is 0.11112 x 23 = 111.12 =7.5
If the storage is returned to normal, then the minimum positive floating point number is 0.12 x 2-4 =0.000012 =1/32 = 0.03125.
Explanation:
Whenever the floating figure is keyed into the computer memory, then the first bit will be the sign bit, the next 8 bits are for exponent and 23 bits are used for storing significand. The array of exponents is from -127 to 128. While Exponent 127 stands for 0 and positive figures can be represented by values bigger than 127. The biggest floating point number will be represented as 0.111111.... 1111x 211111111