Python Quiz #1

Quiz
•
Other
•
8th Grade
•
Hard
Julio Hernandez Saca
Used 5+ times
FREE Resource
22 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Question : What is the result of the following Python expression?
A) 11
B) 16
C) 10
D) 26
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Question : Which of the following data types is used to store whole numbers in Python?
A) Float
B) String
C) Integer
D) Boolean
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Question : Which loop is typically used when you know in advance how many times you want to repeat a piece of code?
A) For loop
B) While loop
C) Do-While loop
D) Repeat-Until loop
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Question : What will the following code print?
A) 0 1 2 3 4
B) 1 2 3 4 5
C) 0 1 2 3
D) 1 2 3 4
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Question : In Python, what keyword is used to start an if-else statement?
A) elif
B) else
C) then
D) case
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Question : Which of the following is not a valid variable name in Python?
A) my_variable
B) 123variable
C) _underscore
D) myVariable
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the random.randint(1, 10) function do in Python?
A) Generates a random float between 1 and 10
B) Generates a random integer between 1 and 9
C) Generates a random integer between 1 and 10
D) Generates a random integer between 2 and 10
Create a free account and access millions of resources
Similar Resources on Wayground
22 questions
Programming with Karel

Quiz
•
3rd - 8th Grade
18 questions
Droit du travail - Les discriminations

Quiz
•
KG - 12th Grade
20 questions
Metric Measure (and Scientific Method)

Quiz
•
6th - 8th Grade
18 questions
Keyboard Shortcuts

Quiz
•
5th - 12th Grade
21 questions
Game Design

Quiz
•
8th Grade
20 questions
Exploring the 2019 8th Grade Intermediate Level Science Test

Quiz
•
6th - 8th Grade
20 questions
Kadın Girişimciler ve Teknoloji

Quiz
•
2nd Grade - University
20 questions
Communication

Quiz
•
6th - 8th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Other
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
20 questions
Figurative Language Review

Quiz
•
8th Grade
18 questions
Identifying Functions Practice

Quiz
•
8th Grade
20 questions
Scientific method and variables

Quiz
•
8th Grade
20 questions
Physical and Chemical Changes

Quiz
•
8th Grade
6 questions
Rule of Law

Quiz
•
6th - 12th Grade