← All topics
Quiz: Python Interview Programs: questions with answers
13 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. What does reversenumber(1200) (from this lesson) return?
- Q2. Why does the prime check loop only while i i <= n?
- Q3. What does this print? (code)
- Q4. What is the time complexity of binary search?
- Q5. In FizzBuzz, what goes wrong if you check i % 3 == 0 before i % 15 == 0?
- Q6. What does this print? (code)
- Q7. What does this print? (code)
- Q8. What does this print? (code)
- Q9. What does this print? (code)
- Q10. What does this print? (code)
- Q11. What does this print? (code)
- Q12. Binary search needs at most how many comparisons for a sorted list of 1,000 items?
- Q13. What does this print? (code)