(CO 7) Evaluate the value of the following Scheme expressions.
1. (* 4 5)
2. (+ 1 5 3)
3. (+ 2 (- 6 3))
4. ((LAMBDA (x) (* x x x)) 2)
(CO 5) What are the arguments for and against the C++ policy on inlining of methods?
(CO 6) Explain why allowing a class to implement multiple interfaces in Java and C# does not create the same problems that multiple inheritance in C++ creates.
(CO 8) Describe how a multiple-processor machine could be used to implement resolution. Could Prolog, as currently defined, use this method?
Answer (C07):
1. (* 4 5)
2. (+ 1 5 3)
3. (+ 2 (- 6 3))
4. ((lambda (x) (* x x x)) 2)
(CO 7) Evaluate the value of the following Scheme expressions. 1. (* 4 5) 2. (+...
Draw binary tree diagrams for each of the following Scheme expressions: '(1 2 3 4 5) '(1 (2 (3 (4 (5))))) '(((((1) 2) 3) 4) 5) '((1 2) ((3 4) ((5 6)))) '((()) ((()) ()))
11. Evaluate each of the following expressions: a. 4*3/6-4+ Math.pow(7,2) b. (3+4)*7-3 c. 9*2/4+5%3+3 d. 55 55
1. (3% each) Given the following declarations: int a-4 int b-6: float5.0 Evaluate the following Java expressions: a) (5 + a / b) % 2- b) c / (10 % b) C) 5 * 300 7 + 8 / 3-6
1. Evaluate each of the following expressions: X 0.85-k for x = 0, 1, 2, and 3 (b) {\_, 2ke-2/k! for x = 0, 1, 2, and 3 (12 points)
Q3: Expand the following functions by partial fraction expansion. Do not evaluate coefficients or invert expressions. 2 (a) x(s) = (5 + 1)(²+1) (s +3) (6) X() – F76+ 16 + 24 g Dos (b) x(s) = 31 sºls + 1) (s + 2)(s + 3) (c) X(s) = 1 (s + 1)(s + 2)(8 + 3)(s + 4)
Question Which of the following are propositional expressions? 1. The computeris a tablet 2. A tablet computer is the best computer 3. The sky is blue 4. If the sky is blue then unicorns do not have a forehead horn 5. It is not the case the building has ten floors 6. x + 5 = 9 7. 6 + 5 = 9 8. Shelly seems like a good person 9. Is Bob tall? 10. There are ten single digit...
1. Evaluate the following expressions if p = 8, 9 = 3, and the value of the variable found is False. Show your work. . q <= p . not (p == 4-5) . q != p % 5 . found or p > 5 and q == p + 5 2. Are you able to draw the truth tables for AND, OR, and NOT logical expressions? - Translate the following problem descriptions into Python. 3. If score is greater...
Normalize the following untyped applied lambda calculus expressions as much as possible using the call-by-value rules, showing all steps CLEARLY, please. TYPED answer is preferred. a) (λx. x * x) 1 b) (λx. x + 4) ((λy. y + 5) 3) c) (λf g x. g (f x)) (λa. a * a) (λb. b + 1 + 2) 3 d) (λf x. f (f (f x))) (λb. if b then false else true) true
Evaluate 7 Stdx +3 2) Sierda *) we taaperoid moule to approssimate 3) sx + 2 2 - 7x+6 Sede m=4 Value of the function 5 Find the average f defined by f(x) = (x - 7² [2,5 6 find c such that of average value = ft) 16 evaluate sint cose dy 77 cont 2 x + 4 find the area of the region between x=0 and x bonded by 2= π
5. Evaluate the value of arcsin (-2) 6. Evaluate the expression sin (arcsin (-3)). 7. Evaluate the expression arctan(cos(it)). 8. Evaluate the expression tan (arcsin (-2)