Python Quiz 7

Quiz
•
Computers
•
KG - 6th Grade
•
Hard
Jerry Xiao
Used 7+ times
FREE Resource
14 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
True or False: In Python, there is no restriction on the name of a module file.
True
False
2.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
True or False: The randint function returns a randomly selected value from a specific sequence of numbers
True
False
3.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
A(n) _____ is a variable that receives an argument that is passed into a function
Argument
Parameter
Named Constant
Global Variable
4.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
What will be the output after the following code is executed?
def pass_it(x, y): ㅤㅤㅤㅤㅤ
ㅤz = x + “, “ + y ㅤㅤ
return(z) ㅤㅤㅤㅤ
name2 = “Tony” ㅤㅤㅤㅤㅤ
ㅤname1 = “Gaddis” ㅤㅤㅤㅤㅤ
ㅤㅤㅤfullname = pass_it(name1, name2)
ㅤprint(fullname)ㅤㅤㅤㅤㅤㅤㅤ
Gaddis, Tony
Gaddis Tony
Tony Gaddis
Tony, Gaddis
5.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
What will be displayed after the following code is executed?:
def pass_it(x, y): ㅤㅤㅤㅤㅤㅤㅤㅤ
z = x*y ㅤㅤㅤㅤㅤㅤㅤㅤ
result = get_result(z) ㅤㅤㅤ
return(result) ㅤㅤㅤㅤㅤㅤ
def get_result(result): ㅤㅤㅤㅤㅤㅤㅤ
z = result + 2 ㅤㅤㅤㅤㅤㅤ
return(z) ㅤㅤㅤㅤㅤㅤㅤㅤ
num1 = 3 ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ
num2 = 4 ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ
answer = pass_it(num1, num2) ㅤㅤㅤ
print(answer)ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ
9
14
12
Syntax Error
6.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
What are the benefits of creating a function?
Simpler Code
Code Reuse
Better Testing and Debugging
Faster Development and Easier for TeamWork
All of the Above
7.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
True or False: The below functions are the same.
max()
Max()
True
False
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Python Unit 3

Quiz
•
University
11 questions
Python Basics Quiz

Quiz
•
8th Grade
14 questions
Python Functions and Flowcharts

Quiz
•
1st - 3rd Grade
15 questions
Введение в программирование Python

Quiz
•
11th Grade
10 questions
Python Basics

Quiz
•
8th - 10th Grade
17 questions
Python KS3

Quiz
•
8th Grade
10 questions
PCEP Section 4B: the function and its environment

Quiz
•
12th Grade
12 questions
Swift Playground

Quiz
•
5th - 6th Grade
Popular Resources on Wayground
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World

Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
20 questions
ELA Advisory Review

Quiz
•
7th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns

Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
18 questions
Company Logos

Quiz
•
6th - 8th Grade
14 questions
Inputs and Outputs: Computer Science Intro

Lesson
•
5th - 9th Grade
16 questions
4.2 Private & Personal Information

Lesson
•
4th Grade
20 questions
Input, Output, Processing or Storage

Quiz
•
5th - 6th Grade