Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.