Py Functions Flashcards

1
Q

How to create a function?

A

]] def ( var A, var B ): – fn.header

]] …. – fn.body, what fn. actually does

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

How to create a parameterised function?

A

]] def ( param A, param B, param C ):

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

How can a default value be provided to a parameterised function?

A

]] def ( Param A = ‘def.value’, Param B ):

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

Can a function call return more than one value?

A

yes, it can return a tuple

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

How can a multiple variable reply be assigned multiple variables?

A

by having multiple variables assigned, mapped to the outputs

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