Answer: to be exact you need 28mm of tubing for that
Explanation:
When the election
Answer:
The solution code is written in Java.
- public class Main {
-
- public static void main(String[] args) {
-
- Scanner inNum = new Scanner(System.in);
- System.out.print("Enter number of toss: ");
- int num = inNum.nextInt();
-
- for(int i=0; i < num; i++){
- System.out.println(toss());
- }
- }
-
- public static String toss(){
- String option[] = {"heads", "tails"};
- Random rand = new Random();
- return option[rand.nextInt(2)];
- }
- }
Explanation:
Firstly, we create a function <em>toss()</em> with no parameter but will return a string (Line 14). Within the function body, create an option array with two elements, "heads" and "tails" (Line 15). Next create a Random object (Line 16) and use <em>nextInt()</em> method to get random value either 0 or 1. Please note we need to pass the value of 2 into <em>nextInx() </em>method to ensure the random value generated is either 0 or 1. We use this generate random value as an index of <em>option </em>array and return either "heads" or "tails" as output (Line 17).
In the main program, we create Scanner object and use it to prompt user to input an number for how many times to toss the coin (Line 6 - 7). Next, we use the input num to control how many times a for loop should run (Line 9). In each round of the loop, call the function <em>toss() </em>and print the output to terminal (Line 10).
Answer:
Explanation:
There are a total of 6 states and 3 bits in this problem. Whenever the Reset button is pressed, RESET state is called otherwise the state according to the diagram is called. For the combination to be "01011", the input sequence has to be in the same order. If 0 is pressed instead of 1 in state "010", the last state of output ending with 0 will be called and likewise in all the states that follow.
Answer:
B) 5.05
Explanation:
The wall thickness of a pipe is the difference between the diameter of outer wall and the diameter of inner wall divided by 2. It is given by:
Thickness of pipe = (Outer wall diameter - Inner wall diameter) / 2
Given that:
Inner diameter = ID = 25 ± 0.05, Outer diameter = OD = 35 ± 0.05
Maximum outer diameter = 35 + 0.05 = 35.05
Minimum inner diameter = 25 - 0.05 = 24.95
Thickness of pipe = (maximum outer wall diameter - minimum inner wall diameter) / 2 = (35.05 - 24.95) / 2 = 5.05
or
Thickness = (35 - 25) / 2 + 0.05 = 10/2 + 0.05 = 5 + 0.05 = 5.05
Therefore the LMC wall thickness is 5.05