Python Functions Quiz
Quiz
•
Computers
•
8th Grade
•
Practice Problem
•
Medium
Dean Groom
Used 30+ times
FREE Resource
Enhance your content in a minute
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the input() function in Python?
Display a message
Take input from the user
Perform a mathematical operation
End the program
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the print() function do in Python?
Take input from the user
Print a file
Display text or variables on the screen
Run a Python script
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What type of value does the input() function always return?
Integer
String
Boolean
List
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a correct way to use the if statement in Python?
if x == 5:
if (x = 5):
if x => 5:
if x equals 5:
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the else statement in Python?
To define a loop
To check multiple conditions
To execute a block of code if the condition is false
To end a program
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to create a function in Python?
func
function
def
create
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following libraries can be imported to generate random numbers?
math
random
time
input
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
24 questions
Information Transfer
Quiz
•
8th Grade
15 questions
Cyber Security KS4
Quiz
•
8th - 12th Grade
15 questions
Linux-2 Quiz 2 -- LAMP
Quiz
•
1st - 12th Grade
20 questions
End of year quiz: Spreadsheet Modelling
Quiz
•
8th Grade
20 questions
Name The Disney Animation Films
Quiz
•
KG - University
15 questions
Empowerment Technologies
Quiz
•
KG - 12th Grade
20 questions
DPS Jorhat - Robotics Skill Assessment
Quiz
•
6th - 8th Grade
19 questions
Mengenal Perangkat Komputer
Quiz
•
6th - 8th 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
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
20 questions
Figurative Language Review
Quiz
•
6th Grade
