← Quiz: Python Interview Programs: all 13 questions
Quiz: Python Interview Programs · Question 7 of 13
What does this print? (code)
What does this print?
a, b = 0, 1
for _ in range(6):
a, b = b, a + b
print(a)
- A.5
- B.8
- C.13
- D.6
Answer & explanation
Correct answer: 8
Fibonacci: 1, 1, 2, 3, 5, 8.
Can you get the rest right without peeking?
Take the timed Quiz: Python Interview Programs quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →