Python Functions Quiz

Quiz
•
Computers
•
8th Grade
•
Medium
Dean Groom
Used 21+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Gaming Lesson 2

Quiz
•
6th - 8th Grade
15 questions
Asesmen SK - Hardware Software 8

Quiz
•
8th Grade - University
18 questions
Coding Terminology

Quiz
•
3rd - 12th Grade
15 questions
KS3 Von Neumann Architecture

Quiz
•
6th - 8th Grade
16 questions
Year 7 - CPU, RAM, ROM

Quiz
•
7th - 11th Grade
20 questions
What about technology? - Codeweek 2022

Quiz
•
5th - 11th Grade
18 questions
LocoRobo Lesson 11

Quiz
•
6th - 12th Grade
15 questions
Знакомство с IDLE 6 класс

Quiz
•
6th Grade - University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

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

Interactive video
•
6th - 10th Grade
15 questions
Acceptable Use Policy (Quiz)

Quiz
•
6th - 8th Grade
25 questions
Career Vs. Job

Quiz
•
6th - 8th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
30 questions
Introduction to Computers

Quiz
•
8th - 9th Grade
20 questions
Copyright and Fair Use

Quiz
•
6th - 8th Grade
15 questions
Computer Components Video

Interactive video
•
8th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade