Search Header Logo

AP CSP Functions and Parameters Review

Authored by Christopher Jones

Computers

10th Grade

Used 19+ times

AP CSP Functions and Parameters Review
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

50 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword begins a function **definition** in Python?

def
func
define
lambda

Answer explanation

`def` starts a function definition.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are the items inside the parentheses in a function header called?

Returns
Parameters
Arguments
Keywords

Answer explanation

Parameters are names in the function header; arguments are values at call time.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

By default, what does a function **return** if it has no return statement?

0
False
None
An empty string

Answer explanation

If no `return` is encountered, Python returns `None`.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which line correctly **calls** a function named `greet` with one argument `"Ada"`?

greet{'Ada'}
greet['Ada']
greet('Ada')
def greet('Ada')

Answer explanation

Function calls use parentheses: `name(args)`.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What symbol ends a Python function header line?

Semicolon (;)
Colon (:)
Period (.)
Comma (,)

Answer explanation

Function headers end with a colon in Python.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Where does a function's **local variable** exist?

Only inside that function
Everywhere in the program
Across different files
In the Python shell only

Answer explanation

Local variables have scope limited to the function.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct term for the value you pass into a function when calling it?

Parameter
Argument
Return
Scope

Answer explanation

Arguments are the values supplied to parameters.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?