Answer:
function waterPark() {
var age = parseInt(prompt("Enter your Age: "));
var height = parseInt(prompt("Enter your Height (in inches): "));
if ( age >= 14 || height >= 48){
console.log("You can ride in our park");
} else {
console.log("You are not eligible to ride in the park");
}
}
waterPark( );
Explanation:
The Javascript function "waterPark" prompts users for their age and height to check if they are eligible to ride in the park. The prompt is parsed to an integer and assign respectively to the age and height variable.
The if conditional statement compares the age and height of the user to know if they are eligible to ride in the park or not.
Answer:
(A) The CPU time for J1 is =2 ms other time is =18 ms, for J2 CPU time =6 ms other time = 24 ms, for J3 CPU time = 3 ms and other time = 12 ms (B) The CPU Utilization for uni-programming is 0.203 or 20.3% (C) For Multi-programming, when a program is not free and busy with an operation, the CPU is allocated to other programs.
Explanation:
Solution
Given that:
A(1)Job J1 = CPU time = 2ms
Other time =18 ms
Total time = 20 ms
(2)Job J2 = CPU time 6ms
Other time = 24 ms
Total time = 30 ms
(3)Job J3 = CPU time = 3ms
Other time =12ms
Total time = 15 ms
(B) For the CPU Utilization for uni-programming, we have the following as follows:
CPU utilization =The total time of CPU/The total real time
Thus,
=(2 +6+3) / (18+24+12)
= 11/54
=0.203 or 20.3%
(C) For the CPU utilization for multi-programming, when a program is not available that is busy in an operation, such as the input and output the CPU can be allocated or designated to other programs
<span>External computer parts are those that connect to the case, often to provide ways to input or output data.
Here are a 6 examples of external parts:
</span>Monitor
Keyboard
Mouse
Speakers
Printer
External Hard Drives
I hope this has helped you.