
Python Data Types Quiz

Quiz
•
Computers
•
12th Grade
•
Hard
Haden Hiser
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a text type in Python?
dict
list
int
str
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax to print the data type of variable x if x = 5?
print(x.type())
print(x.dtype())
print(type(x))
print(dtype(x))
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a correct way to set a variable x to a list?
x = ("apple", "banana", "cherry")
x = ["apple", "banana", "cherry"]
x = {"apple", "banana", "cherry"}
x = "apple, banana, cherry"
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a boolean type in Python?
1
None
0
True
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you specify the data type of a variable x to be a dictionary?
x = {"John", 36}
x = {"name" : "John", "age" : 36}
x = ["name" : "John", "age" : 36]
x = dict(name="John", age=36)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a binary type in Python?
str
int
list
bytes
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct way to set a variable x to a frozenset?
x = {"apple", "banana", "cherry"}
x = ("apple", "banana", "cherry")
x = frozenset(["apple", "banana", "cherry"])
x = ["apple", "banana", "cherry"]
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Javascript

Quiz
•
10th - 12th Grade
8 questions
Python For Loops Quiz

Quiz
•
12th Grade
9 questions
Python Loops and Range Quiz

Quiz
•
12th Grade
10 questions
Python_Quiz

Quiz
•
12th Grade
12 questions
Gaming 2023

Quiz
•
1st Grade - Professio...
10 questions
Past Technology

Quiz
•
KG - Professional Dev...
15 questions
Section 3A: Collect and process data using lists

Quiz
•
12th Grade
12 questions
Lists IN PYTHON!!!!!!!!

Quiz
•
KG - 12th 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