Search Header Logo

Functions With Return Values U1M2 Python

Authored by Johnny Darling

Computers

9th - 12th Grade

Used 83+ times

Functions With Return Values U1M2 Python
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

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

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

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?