Functions Flashcards

1
Q

What is the syntax to create a basic function in Python?

A

def myFunc(n, m):
print(n, m)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

When are nested functions helpful in Python?

A

Recursive problems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the advantage of using nested functions in Python?

A

Inner function has access to all properties in outer function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly