Functions With Return Values U1M2 Python

Functions With Return Values U1M2 Python

9th - 12th Grade

12 Qs

quiz-placeholder

Similar activities

Python - Variables and Input

Python - Variables and Input

1st - 10th Grade

16 Qs

Functions in Python

Functions in Python

9th - 12th Grade

15 Qs

SUBROUTINE 101

SUBROUTINE 101

9th Grade

10 Qs

Input and Output Operations in Python

Input and Output Operations in Python

6th - 10th Grade

11 Qs

Python Inputs

Python Inputs

6th - 10th Grade

11 Qs

# REVIEW 1 DATA TYPES

# REVIEW 1 DATA TYPES

10th Grade

15 Qs

SLR 9 - Advanced Programming Techniques - Part Two

SLR 9 - Advanced Programming Techniques - Part Two

10th Grade

10 Qs

Python basics

Python basics

9th - 12th Grade

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