stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Python Programming Flashcards | StudBud
Explore
/
Python Programming
Python Programming
13 terms
·
StudBud Administration
·
41 plays
A quiz on Python programming concepts taught in NC BP14 Python Programming I
Flashcards
13 cards
F
Practice quiz
P
Host live
L
Questions
13
Answers
1
What is the output?
5
Eve
[“Ann”, “Bob”, “Cat”, “Dan”, “Eve” ]
Nothing there is a Index out of range error
2
What is printed by the following code?
Nothing there is a index out of range error.
1, 3, 5, 7 on separate lines
1, 2, 3, 4, 5, 6, 7 on separate lines
Nothing there is a syntax error
3
What is printed by
print ("XYZ".islower())
Nothing. An error occurs.
True
False
xyz
4
What is the output from the following code
['Abel', ‘Ann’, ‘Bob’, ‘Cat’, ‘Dan’]
Nothing there is a syntax error.
[‘Ann’, ‘Bob’, ‘Cat’, ‘Dan’, 'Abel']
[‘Ann’, 'Abel',‘Bob’, ‘Cat’, ‘Dan’, Eve']
5
What type of error will the following code generate?
Indentation error
There is no error. Code will work just as it is.
Type error
Index out of range error
6
What is the output of the following code:
True
False
Integer
Bool
7
If the user enters 16, what is the output of the following code snippet?
Nothing. There is a TypeError.
Your age is 16
Your age is16
There is a NameError
8
Which symbol is used for an
decision
block in a flow chart?
Rectangle
Oval
Parallelogram
Diamond
9
What is the output of this code?
None
[7,6,5,4,3,2,1]
[1, 2, 3, 5, 6, 7]
Nothing there is a syntax error.
10
Which symbol is used for an
process
block in a flow chart?
Rectangle
Parallelogram
Diamond
Oval
11
What is the output of the following code snippet?
[“Ann”, “Bob”, “Carl” ]f
Ann Bob Carl
Nothing there is an index out of range error
Ann Bob Carl on separate lines
12
What is the output of the following code:
Nothing is printed due to a code error.
The five names printed on 5 separate lines.
['Abel', ‘Ann’, ‘Bob’, ‘Cat’, ‘Dan’]
[‘Ann’, ‘Bob’, ‘Cat’, ‘Dan’, Abel']
13
Which symbol is used for an
input
block in a flow chart?
Rectangle
Oval
Parallelogram
Diamond