Answer:
Java code is given below
Explanation:
import java.util.Random;
class Die{
private int sides;
public Die(){
sides = 6;
}
public Die(int s){
sides = s;
}
public int Roll(){
Random r = new Random();
return r.nextInt(6)+1;
}
}
class DieRoll{
public static void main(String[] args) {
Die die = new Die();
int arr[] = new int[6];
for(int i=0; i<6; i++)
arr[i] = 0;
for(int i=0; i<100; i++){
int r = die.Roll();
arr[r-1]++;
}
for(int i=0; i<6; i++)
System.out.println((i+1)+" was rolled "+arr[i]+" times.");
}
}
Answer:
Streaming movies may stop to buffer
Explanation:
microphones have a set record limit, and games downloaded wont generate errors unless something in the code is wrong, printers don't really need to connect to internet to work except for some, and streaming movies buffer because as you are watching them it downloads the next few minutes.
Answer:
These are the supplies in the list:
[‘pencil’, ‘notebook’, ‘backpack’, ‘pen’, ‘calculator’]
Explanation:
The line return (\n) character will be in the output (so there will be a change of line), but it will NOT be visible as it would have been interpreted as a special character.
So the output will be on 2 different lines, with no \n visible.
If the command would have been: print('These are the supplies in the list:\n', supplies), with single quotes (') instead of double quotes (") then then \n would have been printed but not interpreted as a special character. At least in most computer language. Since we don't know of which language the question refers to, we can't be sure at 100%.
<u>Answer:</u>
<em>The user must use min() to attain the desired results. Let us understand the syntax of min() with an example.
</em>
<em>Syntax:
</em>
<em>min(range)</em> where min is the name of the function and the range specifies the address of cells from which the <em>minimum number needs to be found</em>.
<em>Eg. min(A1:A8)
</em>
This function will scan the values from A1 to A8 and then find the minimum value from the given range of values.
<em>So according to the problem,
</em>
<em>B22 = min(range). </em>Provide range for which<em> minimum attendance needs to be calculated.
</em>
Answer:
The answer is output.open("yearsummary.txt", ios::trunc)
Explanation:
Given an ofstream object named output, associate it with a file named yearsummary.txt for output in a way that truncates (erases) any existing data in the file. The file is output.open("yearsummary.txt", ios::trunc)