🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← All topics

Quiz: Python Introduction: questions with answers

15 questions, each with the answer and a short explanation.

Take the timed quiz + get a certificate →
  1. Q1. What does this print? (code)
  2. Q2. Which symbol starts a comment in Python?
  3. Q3. What happens when you run print(Hello) without quotes (and no variable named Hello exists)?
  4. Q4. How does Python show which lines belong inside an if block?
  5. Q5. When installing Python on Windows, which option should you tick?
  6. Q6. What does this print? (code)
  7. Q7. Which file extension do Python source files use?
  8. Q8. What does this print? (code)
  9. Q9. What is the Python interactive shell () mainly used for?
  10. Q10. Python is called "interpreted" because…
  11. Q11. What does this print? (code)
  12. Q12. A program has four correct print lines and then print(total) on line 5, where total was never created. What do you see when you run it?
  13. Q13. What does this print? (code)
  14. Q14. What happens when you run Print("Hi") with a capital P?
  15. Q15. An error message has several lines. Which line should you read first?