def count_recursive(n=1):
if n > 3:
return
print(n)
count_recursive(n + 1)
1 1 2 2 3 3
3 2 1
3 3 2 2 1 1
1 2 3
Correct Answer:
1 2 3
What would this recursive function print if it is called with no parameters?
def count_recursive(n=1):
if n > 3:
return
print(n)
count_recursive(n + 1)
1 1 2 2 3 3
3 2 1
3 3 2 2 1 1
1 2 3
Correct Answer:
1 2 3
Latest Updates
No posts found in this category.