Python -- Defining Functions Flashcards

1
Q

What key word is used to create a function?

A

The ‘def’ keyword

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

What are parameters?

A

Placeholders for the actual values the function needs

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

How to leave a function blank without getting an error?

A

Use the ‘pass’ function under the ‘def’ keyword:

def hello_func():

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

What happens when there is no parenthesis after when a function is called?

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