Compsci 6, Fall 2011, Classwork 19

PRINT Names and NetID of students in group (min 2, max 3)
Name: __________________________   NetID: _____________

Name: __________________________   NetID: _____________

Name: __________________________   NetID: _____________

Problem:

Consider the following Mystery function.

def Mystery(num): if num > 0: return 1 + Mystery(num/2) else: return 2 + num

What is Mystery(2)?

What is Mystery(4)?

What is Mystery(8)?

What is Mystery(17)?