Python Functions and Returns

Python Functions and Returns

9th - 12th Grade

14 Qs

quiz-placeholder

Similar activities

Intro to Python Project Stem U4 Repetition Loops Vocab Quiz

Intro to Python Project Stem U4 Repetition Loops Vocab Quiz

9th - 12th Grade

17 Qs

4ESO. TECNOLOGIA. UNIT 5. TEST. DIGITAL ELECTRONIC

4ESO. TECNOLOGIA. UNIT 5. TEST. DIGITAL ELECTRONIC

10th Grade

13 Qs

2.5 Translators & Facilities - OCR GCSE Computer Science

2.5 Translators & Facilities - OCR GCSE Computer Science

7th - 12th Grade

13 Qs

Computer Basics and Programming Quiz 2

Computer Basics and Programming Quiz 2

12th Grade - University

15 Qs

12/3  Classes & Objects

12/3 Classes & Objects

9th - 11th Grade

17 Qs

Programming in C language

Programming in C language

12th Grade - University

18 Qs

Intro to Python Project Stem Unit 4 Vocab Test

Intro to Python Project Stem Unit 4 Vocab Test

9th Grade

17 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?