View Single Post
Recursion question
Old
cedricdosss
Junior Member
 
Status: Offline
Posts: 10
Join Date: Nov 2012
Default Recursion question - 11-30-2012, 06:12 AM

7. Which of the following is best describes “recursion”:

a. It is a loop identified during programming by the reserved word: RECURSION.
b. It is a programming technique.
c. It is a complex technique that should be avoided.
d. It is similar to a random number generator.
e. It is most like an infinite loop.

I think the right answer is B


10. In Chapter 7, Table 7-2, of “Starting Out with Alice”, there are a number of functions associated with Lists. Suppose that you used the ‘size of list’ function on a list and it returned a value of 10. The list function “First item from list” returns the first item in the list. As noted, it is in position 0. Using the function “Last item from list”, then would return the last item. What “position” is this last item?
a. Zero
b. One
c. Nine
d. Ten




4. Which one of the following statements is true:
a. A class cannot contain more than one method.
b. The color red is an example of a method.
c. Methods are part of a class.
d. Methods in one class cannot call methods of another class.
   
Reply With Quote