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:
maximum stress is 2872.28 MPa
Explanation:
given data
radius of curvature = 3 ×
mm
crack length = 5.5 ×
mm
tensile stress = 150 MPa
to find out
maximum stress
solution
we know that maximum stress formula that is express as
......................1
here σo is applied stress and a is half of internal crack and t is radius of curvature of tip of internal crack
so put here all value in equation 1 we get
σm = 2872.28 MPa
so maximum stress is 2872.28 MPa
Answer:
The angular velocity is 7.56 rad/s
the maximum water height is 2 ft
Explanation:
The z-position as a function of r is equal to
(eq. 1)
where
h0 = initial height = 1 ft
w = angular velocity
R = radius of the cylinder = 1.5 ft
zs(r) = 0 when the free surface is lowest at the centre
Replacing and clearing w

if you consider the equation 1 for the free surface at the edge is equal to

Answer:
Part 1: It would be a straight line, current will be directly proportional to the voltage.
Part 2: The current would taper off and will have negligible increase after the voltage reaches a certain value. Graph attached.
Explanation:
For the first part, voltage and current have a linear relationship as dictated by the Ohm's law.
V=I*R
where V is the voltage, I is the current, and R is the resistance. As the Voltage increase, current is bound to increase too, given that the resistance remains constant.
In the second part, resistance is not constant. As an element heats up, it consumes more current because the free sea of electrons inside are moving more rapidly, disrupting the flow of charge. So, as the voltage increase, the current does increase, but so does the resistance. Leaving less room for the current to increase. This rise in temperature is shown in the graph attached, as current tapers.