Python Test 1

Q1. What is the primary purpose of programming?

Q2. Which of these is a Python IDE?

Q3. What is the output of: print("Hello, World!")?

Q4. Which of these is a correct way to comment a single line in Python?

Q5. What is the data type of 3.14 in Python?

Q6. How do you check the data type of a variable x?

Q7. What does the input() function return?

Q8. Which one is a mutable collection in Python?

Q9. Which operator is used for exponentiation?

Q10. What will be the result of int("10")?

Q11. Which is used to define a block of code in Python?

Q12. What keyword is used to define a conditional in Python?

Q13. Which of the following is not a Python data type?

Q14. Which Python version introduced match-case?

Q15. What will be the output of: print(10 > 5)?

Q16. What is the correct syntax for multi-line comments?

Q17. Which escape sequence is used for a new line?

Q18. What is the output of not True?

Q19. Which of the following is a correct assignment operator in Python?

Q20. Which keyword is used for the default case in match-case?

Leave a Comment

Your email address will not be published. Required fields are marked *