1. Which of the following errors does not prevent the program from running, but
ID: 3756324 • Letter: 1
Question
1.
Which of the following errors does not prevent the program from running, but causes it to produce incorrect results?
syntax
hardware
logic
fatal
2.
Which of the following is a Python tuple?
[1,2,3,4]
{1,2,3,4}
(1,2,3,4)
{}
3.
What is the maximum possible length of an identifier?
31 characters
63 characters
79 characters
None of the above
4.
What is the output of [2,4,6]+[1,3,5]?
[1,2,3,4,5,6]
[3,7,11]
[2,1,4,3,6,5]
[2,4,6,1,3,5]
4.
Which of the following built-in functions returns the highest value in a list?
highest
max
greatest
maximum
5.
Is the following piece of code valid?
>>> a=frozenset([5,6,7])
>>> a
>>> a.add(5)
Yes, the set a is now {5,5,6,7}
No, frozen set is immutable
No, invalid syntax of add method
Yes, now the set a is {5,6,7}
a.syntax
b.hardware
c.logic
d.fatal
Explanation / Answer
1) c) logic
2) c (1,2,3,4)
3) c 79
4) d [2, 4, 6, 1, 3, 5]
5) b max
6) c No, invalid syntax of add method
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.