Functions With Return Values U1M2 Python

Functions With Return Values U1M2 Python

9th - 12th Grade

12 Qs

quiz-placeholder

Similar activities

recap DIN h446

recap DIN h446

12th Grade

11 Qs

Python Revision Tour

Python Revision Tour

12th Grade

10 Qs

Python Basics

Python Basics

8th - 10th Grade

10 Qs

Python User Defined Functions

Python User Defined Functions

12th Grade

14 Qs

PYTHON PROGRAMMING

PYTHON PROGRAMMING

11th - 12th Grade

15 Qs

Python Data types & Exceptions

Python Data types & Exceptions

1st - 10th Grade

14 Qs

User Input in Python

User Input in Python

6th - 10th Grade

11 Qs

Python Functions

Python Functions

12th Grade

15 Qs

Functions With Return Values U1M2 Python

Functions With Return Values U1M2 Python

Assessment

Quiz

Computers

9th - 12th Grade

Medium

Created by

Johnny Darling

Used 75+ times

FREE Resource

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Function names cannot begin with a number as the first character.

True

False

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

def showName():

print("Tobias Ledford")

Which code below calls the function in the above code?

showName.run()

open(showName)

run showName

showName()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A function with 2 integer parameters could start with which definition?

funct addNumbers(num1, num2):

def addNumbers(num1, num2):

def 2Numbers(num1, num2):

FUNCTION addNumbers(x, y):

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

def addNum(num1 = 10):

print(num1 + num1)


Choose the correct output of calling the above function using the following code:


addNum()

0

10

20

An Error

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Python Function return values must be stored in variables.

True

False

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

def addNum(num1 = 10):

return num1 + num1


Choose the correct output of calling the function above using the following code:


print(addNum(100))

20

100

200

an error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

def addNumbers(num1, num2 = 10):

return num1 + num2


Choose the correct output of calling the function above using the following code:


print(addNumbers(100))

100

110

200

An Error

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?