
Python Functions and Procedures Quiz
Quiz
•
Computers
•
9th - 11th Grade
•
Practice Problem
•
Hard
Helen Laleendra
Used 1+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What keyword is used to define a function in Python?
define
func
def
function
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the 'return' statement in a function?
To return a value to the main program
To exit the function
To define a variable
To print a value
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the function 'add_numbers(2, 2)' return?
2
4
None
22
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the procedure 'count' defined as 'for x in range(1, 11): print(x)'?
1 to 11
0 to 11
1 to 10
0 to 10
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which module is used to generate random numbers in Python?
sys
math
OS
random
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the 'randint' function from the 'random' module do?
Generates a random string
Generates a random boolean
Generates a random float
Generates a random integer
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the values passed to a function called?
Parameters
Arguments
Variables
Constants
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
14 questions
LA5.C5: Branching and Subroutines
Quiz
•
9th Grade - University
15 questions
SENATIC Parcial Guía 3_PseInt
Quiz
•
10th Grade - University
10 questions
Quiz 5 - Excel
Quiz
•
11th Grade
15 questions
ONLINE SAFETY
Quiz
•
11th Grade
15 questions
L3...JavaScript - Introducción
Quiz
•
9th Grade
15 questions
1.1.1 The structure and function of the processor
Quiz
•
11th Grade - University
10 questions
Fundamentos PHP (Manejo de Fomularios y arreglos)
Quiz
•
9th Grade
15 questions
visual basic 6.0 LDA
Quiz
•
9th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
