Variables in Python
Quiz
•
Computers
•
8th Grade
•
Practice Problem
•
Medium
Mr. So
Used 347+ times
FREE Resource
Enhance your content in a minute
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Look at the following code:
name = "John"
age = 23
What type of data is stored in the variable name?
str
int
float
nothing
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Look at the following code:
name = "John"
age = 23
What type of data is stored in the variable age?
str
int
float
nothing
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Look at the following code:
name = "John"
age = "23"
What type of data is stored in the variable age?
str
int
float
nothing
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If I want to store my height in a variable, which of the following would be a good variable name in best practice?
abcdefg
inches
number
height
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If I want to store my name in a variable, which of the following would be a good variable name in best practice?
name
teacher
mister
abcdef
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If I want to store multiple names in variables, which of the following would be good variable names in best practice?
a
b
c
name1
name2
name3
Audrey
Ben
John
blah1
blah2
blah3
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Look at the following code:
age = "23"
age = int(age)
What does the int() function do to the data in my variable?
does nothing
changes the string to a float
changes the number to a string
changes the string to an integer
8.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Look at the following code:
age = 23
age = float(age)
What does the float() function do to the data inside age?
changes the string to an int
changes the int to a string
adds a decimal point (23.0)
does nothing
Similar Resources on Wayground
10 questions
Bitmap v Vector Images
Quiz
•
KG - University
12 questions
Flowcharts
Quiz
•
7th - 10th Grade
13 questions
Legislation - Symbols and meanings
Quiz
•
6th - 8th Grade
10 questions
R082 Book Cover Assets planning
Quiz
•
7th - 12th Grade
10 questions
AI QUIZ
Quiz
•
6th - 8th Grade
10 questions
Magazine Photoshop
Quiz
•
8th Grade
10 questions
Lesson 9: Intelligence is the Ability to Adapt to Change
Quiz
•
8th Grade
11 questions
Website constructs
Quiz
•
6th - 8th Grade
Popular Resources on Wayground
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
15 questions
Solving Equations with Variables on Both Sides Review
Quiz
•
8th Grade
