NEW
Font size
WorksheetsFunction Basics Quiz
Total questions: 22
Worksheet time: 11mins
In what section of CMU CS1 do you learn about Function Basics?
1.2.1
2.1.1
2.2.1
3.2.1
The function call is what line number?
1
2
3
5
The function definition is what line number?
1
3
4
5
The body of the function definition starts in what line number?
1
2
4
5
How can you tell which line is the start of the function definition?
It starts with Star(
It's always after a blank line
It's always indented
It starts with "def"
What is one function parameter in the code here?
starSides
'gold'
Star
drawBigStar
What is one function argument in the code here?
starSides
'gold'
drawBigStar
Star
How does Python know which line of code is the body of the function?
The line stars with def
The line has parameters
The line is indented
The line has arguments
How does Python know when the body of the function has ended?
The code starts with def
The line of code has parameters
The code is no longer indented
The line of code has arguments
What does the keyword "pass" do in a Python function?
It passes a value to a variable
It prints "pass"
It does nothing
It causes an error
What would happen if you had a function definition with no body and no "pass" statement?
You would get an error message
Nothing would happen
The code would ask if you want to pass
The code would run with no problems
What is line 1 in this code?
Function body
Function call
Function definition
Dysfunctional
What is line 5 in this code?
Function definition
Function body
Function call
Function parameter
What is line 4 in this code?
Function definition
Function body
Function call
Function parameter
What is line 2 in this code?
Function definition
Function body
Function call
Function parameter
What is 'black' in line 4 of this code?
Function definition
Function body
Function argument
Function parameter
What is starSides in line 1 of this code?
Function definition
Function body
Function argument
Function parameter
Why is line 2 indented in this code?
It's the body of the function
It's the argument of the function
It's the parameter of the function
Why is starSides in parentheses in this code?
It's the body of the function
It's the parameter of the function
It's the argument of the function
Why is 'gold' in parentheses in this code?
It's the body of the function
It's the parameter of the function
It's the argument of the function
Function parameters go with
Function definitions
Function calls
The body of the function
Function arguments
Function arguments go with
Function definitions
Function calls
The body of the function
Function arguments
