Python Functions Quiz

Python Functions Quiz

12th Grade

10 Qs

quiz-placeholder

Similar activities

Test on Python Function

Test on Python Function

11th - 12th Grade

12 Qs

Test on Python Function

Test on Python Function

11th - 12th Grade

12 Qs

PCEP Section 4B: the function and its environment

PCEP Section 4B: the function and its environment

12th Grade

10 Qs

Python Functions 1

Python Functions 1

12th Grade

12 Qs

PYTHON(LIBRARIES)

PYTHON(LIBRARIES)

12th Grade

10 Qs

Python Variables and Scope

Python Variables and Scope

12th Grade

9 Qs

XII_CS_FUNCTIONS

XII_CS_FUNCTIONS

12th Grade

15 Qs

Python Functions

Python Functions

12th Grade

15 Qs

Python Functions Quiz

Python Functions Quiz

Assessment

Quiz

Computers

12th Grade

Hard

DOK Level 1: Recall

Standards-aligned

Created by

Joshwin Paulson

FREE Resource

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

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?