← All topics
Quiz: Python Variables and Data Types: questions with answers
15 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. What is the output? (code)
- Q2. Which is a valid variable name?
- Q3. What does int(7.9) return?
- Q4. What is type(10 / 2)?
- Q5. Which value is "falsy" in Python?
- Q6. What does this print? (code)
- Q7. What is bool("False")?
- Q8. What does this print? (code)
- Q9. Which of these is a float?
- Q10. What does this print? (code)
- Q11. What does this print? (code)
- Q12. Which line gives a TypeError?
- Q13. What does this print? (code)
- Q14. Which variable name is NOT allowed?
- Q15. What does this print? (code)