Answer:
private void printArray(int[] arr){ //0
System.out.print("["); //1
for(int k : arr){ //2
System.out.print(k + ", "); //3
}
System.out.println("]"); //4
}
Explanation:
This method should get you started. Your teacher may want a different format or a different type of loop. If you haven't learned for loops yet don't use them that'd be suspicious ;)
What I did:
0: This is the method heading with one parameter for the 1D array. If you need to access it in a different class change private to public.
1: This prints the [ with no line break
2: This is an enhanced for loop to iterate through each element in a 1D array. Alternatively, a normal for loop looks like this:
for (int i = 0; i < arr.length; i++)
instead of retrieving the variable with the enhanced for, you'd have to use arr[i] instead of k in this scenario.
3: This prints the value in each pass of the loop along with a comma and a space.
4: This adds the ] with a line break when the loop is completed
Hope this helps you get started :D comment if you need further help
Answer:
My take on Data Science is extracting any valuable insight or information from the data given to us or data that we have by using certain programming languages,data manipulation techniques,algorithms.Also representing the result in different form possible like graphs,plots,scatter plots etc.
data science is growing very rapidly and becoming popular day by day.
It would be margins. none of the others are even terms for anything.
Be patience, teach them about the culture.
Answer:
Fragment 1: size (1332), offset value (0), flag (1)
Fragment 2: size (1332), offset value (164), flag (1)
Fragment 3: size (1332), offset value (328), flag (1)
Fragment 4: size (781), offset value (492), flag (1)
Explanation:
The maximum = 1333 B
the datagram contains a header of 20 bytes and a payload of 8 bits( that is 1 byte)
The data allowed = 1333 - 20 - 1 = 1312 B
The segment also has a header of 20 bytes
the data size = 4777 -20 = 4757 B
Therefore, the total datagram = 4757 / 1312 = 4