Python Functions and Returns

Python Functions and Returns

9th - 12th Grade

14 Qs

quiz-placeholder

Similar activities

Media and Information Language

Media and Information Language

11th - 12th Grade

14 Qs

JavaScript Quiz

JavaScript Quiz

12th Grade

15 Qs

Quiz Time!

Quiz Time!

7th - 10th Grade

10 Qs

C++

C++

9th - 12th Grade

10 Qs

Skill #2 - Flow Control with Decisions and Loops

Skill #2 - Flow Control with Decisions and Loops

12th Grade

10 Qs

Conceptos diagramas de flujo

Conceptos diagramas de flujo

11th Grade

18 Qs

Intro to Python Project Stem U4 Repetition & Loops Vocab Test

Intro to Python Project Stem U4 Repetition & Loops Vocab Test

9th - 12th Grade

17 Qs

Introduction to Functions 12 G

Introduction to Functions 12 G

12th Grade

10 Qs

Python Functions and Returns

Python Functions and Returns

Assessment

Quiz

Instructional Technology

9th - 12th Grade

Medium

Created by

Kathleen Mcnamara

Used 25+ times

FREE Resource

14 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image
What will print?
nothing
5
6
an error message

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What does the following code output?

11, 9

16, 16

None, None

225, 117

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct code to define a function?

def area ( ):

area ( )

def area:

def area ( )

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image
How do you correctly call this function
def(1)
x=square( )
defSquare(4)
x=square(5)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword marks a spot in a function where the program flow will go back to the calling code?

break

return

continue

jump

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements correctly defines a function named "haunted" that takes a parameter named "apple"?

haunted(apple)

haunted

def haunted(apple):

apple

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements will successfully send the value "EEK" back from a function to the calling code?

EEK

return EEK

back EEK

#print(EEK)

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?