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:
a) 0.684
b) 0.90
Explanation:
Catalyst
EO + W → EG
<u>a) calculate the conversion exiting the first reactor </u>
CAo = 16.1 / 2 mol/dm^3
Given that there are two stream one contains 16.1 mol/dm^3 while the other contains 0.9 wt% catalyst
Vo = 7.24 dm^3/s
Vm = 800 gal = 3028 dm^3
hence Im = Vin/ Vo = (3028 dm^3) / (7.24dm^3/s) = 418.232 secs = 6.97 mins
next determine the value of conversion exiting the reactor ( Xai ) using the relation below
KIm =
------ ( 1 )
make Xai subject of the relation
Xai = KIm / 1 + KIm --- ( 2 )
<em>where : K = 0.311 , Im = 6.97 ( input values into equation 2 )</em>
Xai = 0.684
<u>B) calculate the conversion exiting the second reactor</u>
CA1 = CA0 ( 1 - Xai )
therefore CA1 = 2.5438 mol/dm^3
Vo = 7.24 dm^3/s
To determine the value of the conversion exiting the second reactor ( Xa2 ) we will use the relation below
XA2 = ( Xai + Im K ) / ( Im K + 1 ) ----- ( 3 )
<em> where : Xai = 0.684 , Im = 6.97, and K = 0.311 ( input values into equation 3 )</em>
XA2 = 0.90
<u />
<u />
<u />
Answer:
Tesla CEO Elon Musk tweeted that the company's stock was too high, and it immediately dropped in value. The tweet may have violated a deal Musk made with the SEC about his tweets and Tesla. Musk also tweeted patriotic lyrics, said his girlfriend Grimes is mad at him, and noted that their child is due on Monday