Answer:
a. Maximum size of file = 8.003 GB
Explanation:
<u>a. Maximum size of file</u>
= (6 * 2 KB) + (2048 * 2 KB) + (2048 * 2048 * 2 KB)
= 12kb + 4096 Kb + 8388608 kb
= 8392716 kb
8392716/1024 mb = 8196.01 MB
8196.01 /1024 GB= 8.003 GB
<u>b. According to above calculation</u>
For 8 GB 6 direct, 1 single and 1 double indirect block requires
so
for 32 GB
24 direct Block
4 single and 4 double indirect block requires
A tornado happens when you mix cold with hot
Answer:
Here is the Python program:
small_container = int(input("Enter the number of small containers you recycled?"))
large_container = int(input("Enter the number of large containers you recycled?"))
refund = (small_container * 0.10) + (large_container * 0.25)
print("The total refund for returning the containers is $" + "{0:.2f}".format(float(refund)))
Explanation:
The program first prompts the user to enter the number of small containers. The input value is stored in an integer type variable small_container. The input is basically an integer value.
The program then prompts the user to enter the number of large containers. The input value is stored in an integer type variable large_container. The input is basically an integer value.
refund = (small_container * 0.10) + (large_container * 0.25) This statement computers the refund that will be recieved for returning the small and larger containers. The small containers holding one litre or less have a $0.10 deposit so the number of small containers is multiplied by 0.10. The large containers holding more than one litre have a $0.25 deposit so the number of large containers is multiplied by 0.25. Now both of these calculated deposits of containers of each side are added to return the refund that will be received for returning these containers. This whole computation is stored in refund variable.
print("The total refund for returning the containers is $" + "{0:.2f}".format(float(refund))) This print statement displays the refund in the format given in the question. The output includes a $ sign and displays exactly two decimal places by using {0:.2f} where .2f means 2 decimal places after the decimal point. Then the output is represented in floating point number using. format(float) is used to specify the output type as float to display a floating point refund value up to 2 decimal places.
Answer:
- import java.util.Scanner;
- public class num8 {
- public static void main(String[] args) {
- int first, second, third, fourth,total;
- double decimalOne, decimalTwo, decimalTotal;
- }
- public static void getData(int first, int second, int third, int fourth, double decimalOne, double decimalTwo){
- System.out.println("Enter the Values");
- Scanner in = new Scanner(System.in);
- first=in.nextInt();
- second=in.nextInt();
- third=in.nextInt();
- fourth=in.nextInt();
- decimalOne = in.nextDouble();
- decimalTwo = in.nextDouble();
- }
- public static int computeTotal(int first, int second, int third){
- return first+second+third;
- }
- public static int computeTotal(int first, int second, int third, int fourth){
- return first+second+third+fourth;
- }
- public static double computeTotal(double decimalOne, double decimalTwo){
- return decimalOne+decimalTwo;
- }
- public static void printAll( int first, int second, int third){
- System.out.println("Number one, two and three are: "+first+" "+second+" "+third);
- }
- public static void printAll( int first, int second, int third, int fourth){
- System.out.println("Number one, two and three and four are: "+first+" "+second+
- " "+third+" "+fourth);
- }
- public static void printAll( int first, int second, int third, int fourth, int fifth){
- System.out.println("Number one, two and three and four are: "+first+" "+second+
- " "+third+" "+fourth+" "+fifth);
- }
- public static void printAll( double first, double second, double third){
- System.out.println("Number one, two and three and four are: "+first+" "+second+
- " "+third);
- }
- }
Explanation:
This solution is provided in Java:
All the variable declarations are done in the main method (lines 3-6)
Eight methods as specified in the question are created (Lines 7, 17, 20, 23, 26, 29, 33 and 37).
Observe the concept of Method Overloading (i.e. methods with same name and return types but different parameter list)
Answer:
According to the latest CDC stats, these are the average heights for U.S. adult men based on age:
Ages 20 to 39: 176.1 centimeters
Ages 40 to 59: 175.8 centimeters
Age 60 and older: 173.4 centimeters