Name (printed):Student ID #:Section # (or TA’s:name and time)CMSC 250 Quiz #1 Wed., August 31, 2005Write all answers legibly in the space provided. The number of points possible for each question is indicatedin square brackets – the total number of points on the quiz is 30, and you will have exactly 10 minutes tocomplete this quiz. You may not use calculators, textbooks or any other aids during this quiz.You MUST SHOW YOUR WORK for complete credit.1. [8 pnts.] Solve for the numeric value of x in each of the following.a. x = log464 − log39b. x =3(26+13)c. 4 = log5(x2)d. x = log212 − log262. [7 pnts.] The 0th elemen t of the Fibonacci sequence is 0. The 1st element of the Fibonacci sequenceis 1. The nth element of the Fibonacci sequence is defined as the sum of the (n-1)th and (n-2)th.Write a recursive method with signature:public int fibonacci(int n);that will return the nth element of the Fibonacci sequence.3. [9 pnts.] Reduce each of the following to a polynomial in the least number of terms.a. x ∗ x2− x2b. (x2− 2x − 3)(1x+1)c. (x +2)(x2− 1)(x)4. [6 pnts.] Given the following Java Code:public int mystery(int n) throws Exception {System.out.print(n); System.out.print(" ");if (n > 100) {return n-10;}else {return mystery(mystery(n+11));}}What is the output of the calling
View Full Document