stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Python Quiz Review Flashcards | StudBud
Explore
/
Python Quiz Review
Python Quiz Review
34 terms
·
StudBud Administration
·
12 plays
Imported from external platform
Flashcards
34 cards
F
Practice quiz
P
Host live
L
Questions
34
Answers
1
Pick the line of code without an error.
a = 2'2
a = '1
a = '1'2.3
a = '4.2'
2
What is the result of the above code?
4
No result, the index is outside of the range
2
3
3
A list can only have a single data type used
True
False
4
Variable names can include underscores.
True
False
5
Which value is printed from the above code?
4
3
2
1
6
The result of the above code is [2, 3].
True
False
7
Mathematical operations/equations can be written using variables.
False
True
8
What is the output of the above code?
3
6
4
5
9
Multiplication in python uses an "x" symbol.
True
False
10
Which toolbar button do you press to view the code conversion feature of the academy?
"EYE" button
"X" Button
"TRASHCAN" button
"PLUS" button
11
A number with decimal places is the integer data type.
True
False
12
The division operator in Python is a backslash.
False
True
13
If you mess up your Python code while using the live code conversion, changing the block code will fix the Python error.
True
False
14
An integer, abbreviated as int, is a positive or negative whole number, containing no decimal places.
False
True
15
A list's first element is at index 0.
False
True
16
A comment is an informational line that is executed when the program is run.
False
True
17
When declaring a list with values, each value is separated by
forward slash
a period
a single space
a comma
18
The left-most index in a list starts at
0
-1
1
19
Which Python command returns the data type of a value?
type()
dir()
datatype()
print()
20
How many of the variables have integer values?
1
2
6
4
21
A floating-point number does not contain decimal places.
True
False
22
In a[:2], 2 is the inclusive end index.
False
True
23
Lists are not mutable.
True
False
24
The print() command allows for messages and data to be displayed in a specific window called the console.
True
False
25
In slicing, the end index is non-inclusive.
True
False
26
The value of
a
in
a = '2.52'
is a decimal.
True
False
27
Any text on a line after the # symbol is not executed as long as the # symbol is not part of a string.
False
True
28
Slicing a list requires an explicitly written start index and stop index.
True
False
29
A multi-line comment uses what symbol(s)?
#
'''
"
//
30
Integer, floating-point, and string data types can all be assigned to variables.
True
False
31
Certain symbols, like %, cannot be used in variable names.
True
False
32
If you change the Python code side of the live code conversion, the blocks program side will change to match.
True
False
33
What Python command would you use to display a variable's value in the console?
println()
print()
console.log()
display()
34
What is the value of c from the above code?
2
7
7.62
5.62