Search Header Logo

Python Functions Quiz

Authored by Joshwin Paulson

Computers

12th Grade

DOK Level 1: Recall covered

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 block of code that only runs when it is called

A variable that stores data

A type of loop

A method to handle exceptions

Tags

DOK Level 1: Recall

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to define a function in Python?

func

define

def

function

Tags

DOK Level 1: Recall

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Abigail is writing a Python program and needs to define a function named `my_function`. What is the correct syntax she should use?

`def my_function:`

`def my_function():`

`function my_function()`

`define my_function()`

Tags

DOK Level 1: Recall

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

¿Cuál es el término para los valores pasados a una función?

Parámetros

Argumentos

Variables

Constantes

Tags

DOK Level 1: Recall

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the term for the variables listed inside the parentheses in the function definition?

Parameters

Arguments

Variables

Constants

Tags

DOK Level 1: Recall

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the `return` statement do in a function?

Ends the function execution

Returns a value and ends the function execution

Prints a value

Continues the function execution

Tags

DOK Level 1: Recall

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following function call: `def add(a, b): return a + b` and `print(add(2, 3))`?

2

3

5

6

Tags

DOK Level 1: Recall

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?