For unlimited access to Study Guides, a Grade+ subscription is required.
35. (2 points) Write a method/function named fact that computes n! (n factorial). Recall that n! is nx (n-1)(n-2)... x 2x1 for n greater >0 and ! is 1. You can assume your method is only passed non-negative values of n.
2. Recall that an XOR gate is a digital logic gate that gives a true (1) output when the two inputs are different, and false (0) otherwise. An equivalent XOR function with inputs A and B can be implemented in Excel 2010 using the formula: a) = AND(OR(A,B), NOTAND(A,B))) b) =A<>B c) = NOT(NOT(A<>B)) d) EAND(NOT(AND(A,B)), OR(A, B)) e) All of the above x
18. Recall that in a Round Robin CPU scheduling each process takes turn and runs for a specified time slice. Assume 3 processes are in ready states with required service times in seconds) as indicated in the following table. Assume also that allowed time slice is 10 seconds. What is the turn-around time for process P2? Process Service Time P1 25 P2 30 To a) 30 b) 55 c) 75 x d) 100 e) None of the above