Question: Q1. Using the general term an = 6n - 5, what is 315? Your Answer: ;] Answer Question 2 (3 points) Q2. Using the general

 Q1. Using the general term an = 6n - 5, whatis 315? Your Answer: ;] Answer Question 2 (3 points) Q2. Usingthe general term a = n2 - 13n, what is the 14thterm? :1 Your Answer: Answer Question 3 (3 points) Q4. What is315 for the arithmetic sequence with 31 = 16 and d =5? Your Answer: Answer Question 4 (3 points) Q6. What is 314for the geometric sequence with 31 = 9 and r = 2?Your Answer: Answer Q8. Suppose g1 = 4 and g2 = 1.The rest of the terms in a recursive sequence are given bythe formula gn = n.gn-1 + 8n-2. Find the 7th term ofthe sequence, 87. Your Answer: AnswerQ9. Consider the following algorithm: sum =0 for] in range(1,10): sum = sum + 0*] + 6) printlsum)What is printed as a result of executing this algorithm? You rAnswer: Answer Question 2 (3 points) Q10. Consider the following algorithm: 81

= 2 82 = 5 for k in rangel3,8): Bk = (k-ll-gk-1+ Bk-z What is the last term, g3, of the recursive sequencegenerated as a result of executing this algorithm? You r Answer: l_lAnswer Question 3 (3 points) Q20. Suppose a computer program has beeninitialized such that the following sets have been stored for use inany algorithm: A = {1, 2, 3, ..., 47} B = {-7,-6, -5, ..., 23} Consider the following algorithm, which represents one partof the whole computer program (comments may occur after the # symbolon any line and are not used in computations): #Part 1: computesA - B and its cardinality AminusB = set() for element inA: # this line runs through every element in A if notielementin B): #A - B is the set of elements that arein A and are not in B AminusB.add(element) # Add to AminusBevery element in A if the element is also not in B

Q1. Using the general term an = 6n - 5, what is 315? Your Answer: ;] Answer Question 2 (3 points) Q2. Using the general term a = n2 - 13n, what is the 14th term? :1 Your Answer: Answer Question 3 (3 points) Q4. What is 315 for the arithmetic sequence with 31 = 16 and d = 5? Your Answer: Answer Question 4 (3 points) Q6. What is 314 for the geometric sequence with 31 = 9 and r = 2? Your Answer: Answer Q8. Suppose g1 = 4 and g2 = 1. The rest of the terms in a recursive sequence are given by the formula gn = n.gn-1 + 8n-2. Find the 7th term of the sequence, 87. Your Answer: AnswerQ9. Consider the following algorithm: sum = 0 for] in range(1,10): sum = sum + 0*] + 6) printlsum) What is printed as a result of executing this algorithm? You r Answer: Answer Question 2 (3 points) Q10. Consider the following algorithm: 81 = 2 82 = 5 for k in rangel3,8): Bk = (k-ll-gk-1 + Bk-z What is the last term, g3, of the recursive sequence generated as a result of executing this algorithm? You r Answer: l_l Answer Question 3 (3 points) Q20. Suppose a computer program has been initialized such that the following sets have been stored for use in any algorithm: A = {1, 2, 3, ..., 47} B = {-7, -6, -5, ..., 23} Consider the following algorithm, which represents one part of the whole computer program (comments may occur after the # symbol on any line and are not used in computations): #Part 1: computes A - B and its cardinality AminusB = set() for element in A: # this line runs through every element in A if notielement in B): #A - B is the set of elements that are in A and are not in B AminusB.add(element) # Add to AminusB every element in A if the element is also not in B n = len(AminusB) #lenO returns the number of elements in the array println) What value is printed as a result of executing this algorithm? Your Answer: Answer Q10A. Consider the following algorithm: 81 = 8 82 = 3 for k > 2: 8k = (k-1)-8k-1 - 8k-2 What is term g6 of the recursive sequence generated as a result of executing this algorithm? Your Answer: Answer Question 5 (3 points) Q9A. Consider the following algorithm: sum = 0 for j in range(1,16): sum = sum + (3*j - 6) print(sum) What is printed as a result of executing this algorithm? Your Answer:Question 1 (3 points) Q12. Fill in the missing element of B such that A = B. A = {7, 19, g, #, 2, 4, &, f, 13, 1, k} B = {#, 1, 7, __, k, 2, f, 19, g, 4, & } Your Answer: Answer Question 2 (3 points) Q13. Let A = {y E Z : 8

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!