
2. Variables and Data Types
Quiz
โข
Education
โข
5th Grade
โข
Practice Problem
โข
Easy
Robotic Schools
Used 173+ times
FREE Resource
Enhance your content in a minute
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min โข 10 pts
๐ Sarah is buying 5 books on an e-commerce website. She stores the number of books in a variable. Which of the following is the correct way to declare this variable in Python? ๐
int books = 5
books = 5
declare books = 5
variable books = 5
2.
MULTIPLE CHOICE QUESTION
1 min โข 10 pts
What is the primary purpose of comments in code? ๐ฌ
To make the code run faster โก
To prevent certain code from executing ๐ซ
To explain the code and make it more readable ๐
To declare variables ๐
3.
MULTIPLE CHOICE QUESTION
1 min โข 10 pts
๐ช A user enters their weight in kilograms on a fitness app. If user_weight = 70.5, what will the data type of user_weight be? ๐
int
float
str
bool
4.
MULTIPLE CHOICE QUESTION
1 min โข 10 pts
๐ฎ John is naming a variable to store his score. Which of the following is NOT a valid variable name in Python?
playerScore
score_1
1score
gameScore
5.
MULTIPLE CHOICE QUESTION
1 min โข 10 pts
๐ฆ In a bank transaction system, if a user tries to add a string and an integer, like in the code below, what will happen?
600
"500100"
Error
None of the above
6.
MULTIPLE CHOICE QUESTION
1 min โข 10 pts
๐ฑ A user inputs their phone number into a website form as a string. How can you convert to a string in Python? ๐ค
str(1234567890)
convert(1234567890)
str.int(1234567890)
string(1234567890)
7.
MULTIPLE CHOICE QUESTION
1 min โข 10 pts
๐ณ In an online payment system, if amount = 100 and currency = "USD", what will be the result of amount + int(currency)? ๐ค
USD100
100USD
Error
None of the above
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
20 questions
Quiz 1st round
Quiz
โข
1st - 5th Grade
20 questions
Revised Bloom's Taxonomy
Quiz
โข
KG - University
15 questions
Initial and Final Consonant Blends
Quiz
โข
1st - 6th Grade
16 questions
Jewish Holidays
Quiz
โข
5th - 12th Grade
16 questions
At the summer camp - Unit 6
Quiz
โข
5th Grade
15 questions
ABSTRACT NOUNS
Quiz
โข
5th Grade
21 questions
Guess the Anime Character
Quiz
โข
KG - Professional Dev...
15 questions
Teacher-Centered vs Learner-Centered Approaches
Quiz
โข
5th 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
