Functions With Return Values U1M2 Python

Quiz
•
Computers
•
9th - 12th Grade
•
Medium
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
Similar Resources on Wayground
11 questions
Python Function

Quiz
•
11th - 12th Grade
11 questions
J277 Programming - Data Types

Quiz
•
9th - 11th Grade
10 questions
KS4 Programming Techniques (1)

Quiz
•
8th - 10th Grade
16 questions
Subroutines

Quiz
•
9th - 11th Grade
10 questions
Python

Quiz
•
10th - 11th Grade
14 questions
Computing Revision JCG

Quiz
•
KG - University
10 questions
Python Data Types

Quiz
•
9th - 12th Grade
10 questions
Python: Functions and Parameters

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade
Discover more resources for Computers
50 questions
Trivia 7/25

Quiz
•
12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade
6 questions
RL.10.1 Cite Evidence

Quiz
•
10th Grade
10 questions
Characteristics of Life

Quiz
•
9th - 10th Grade
14 questions
Algebra 1 SOL Review #1

Quiz
•
9th Grade