LinkedIn Python Skill Assessment Quiz Answers

What would this recursive function print if it is called with no parameters?

Latest Update on 25th January, 2022 by Certification Course Answers

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.