10000+ Videos, 300+ Courses, 60+ Subjects for FREE!
Login with your facebook account to fully utilize the rich content

Comp Sci 6.00 quiz

1. Any program that can be written using only the basic arithmetic operators,
assignment, and conditionals (and no function calls or iteration) will run in
constant time.
True
False
2. There exist problems that cannot be solved in Python without using
iteration.
True
False
3. In Python, dictionaries are immutable.
True
False
4. Recursive solutions to problems are usually more computationally efficient
than iterative ones.
True
False
5. When Newton-Raphson is used to find the root of a polynomial, the order of
complexity is linear in the number of terms in the polynomial.
True
False
6. Given the same input, a program that is O(n2) will always take longer to run
than a program that is O(log n).
True
False
7. What does the following code print?
y = 10.0
x = 1.0
for i in range(10):
y = y - 1.0
x = x - 0.1
print x == y
0
False
True
Other