Search Header Logo

AP CSP Python Functions Quiz

Authored by Amy Calisti

Computers

11th Grade

Used 2+ times

AP CSP Python Functions Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a function in Python?

A built-in module in Python for file input/output operations

A block of reusable code that performs a specific task.

A type of variable in Python

A keyword used to define a loop in Python

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you define a function in Python?

Using the 'function' keyword followed by the function name and parentheses

Using the 'def' keyword followed by the function name and parentheses

Using the 'func' keyword followed by the function name and parentheses

Using the 'define' keyword followed by the function name and parentheses

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of parameters in a function?

To define the function's name

To return values from a function

To pass values into a function

To specify the function's return type

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are arguments in a function?

Values passed into a function

The name of a function

The return value of a function

Variables declared inside a function

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you call a function in Python?

functionName{}

functionName()

functionName[]

functionName{}

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between parameters and arguments?

Parameters are used in object-oriented programming, while arguments are used in procedural programming.

Parameters are variables in a function declaration, while arguments are the actual values passed to the function when it is called.

Parameters and arguments are the same thing.

Parameters are the actual values passed to a function, while arguments are variables in a function declaration.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Can a function have multiple parameters?

No

Yes

Sometimes

Only in certain programming languages

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?