Explore your knowledge of the popular programming language Python with this quiz. Test your understanding of its essential constructs, string manipulation and more!
🔥3 plays5.0 (1)Published
0 of 13 answered
Stacked
What is the data type used to store strings in Python?
1/13
Choose one
int
float
boolean
str
Besides numbers, what are the two types of data in Python?
2/13
Choose one
ints and floats
lists and dictionaries
strings and floats
strings and collections
What type of loop is used when you know how many times you want to loop?
3/13
Choose one
while loop
for loop
do-while loop
foreach loop
Which of the following does not exist in Python?
4/13
Choose one
switch
if-else-if ladder
ternary operator
short-circuiting operators
Which of the following is not a function?
5/13
Choose one
print()
input()
list()
myVar
What is the function for a logical operator OR used for in Python?
6/13
Choose one
return either one or the other
return true if one expression is false
return true if both expressions are true
return true if either expression is true
What kind of Syntax is used in Python?
7/13
Choose one
Indentation-based
Parentheses-based
Bracket-based
Semi-colon-based
Which of the following is not a variable type in Python?
8/13
Choose one
int
bool
list
record
What is an attribute in Python?
9/13
Choose one
A predefined variable
A property of a class
An in-built function
A global keyword
Which of the following is a valid use of the 'in' keyword in Python?
10/13
Choose all that apply
Checking if a number is contained in a range
Checking if a string is contained in a list
Checking if an elements is contained an integer
Checking if an array is contained inside another array
Which of the following is used to persist data to disk in Python?
11/13
Choose all that apply
pickle
cPickle
Pickle
json
Which of the following uses the least memory in Python?
12/13
Choose one
list
tuple
string
dictionary
Which of the following is a valid type of exception in Python?