Class IX – Python Practice Worksheet
(Total Marks: 50 | Time: 1 hour)
Section A – Objective Questions (1 mark each, 20 marks)
1. Who created Python?
2. In which year was Python released?
3. Which of these is not a Python feature? (a) Interpreted (b) Compiled (c) Object-Oriented (d)
Dynamic Typing
4. Which symbol is used for comments in Python?
5. Is Python case-sensitive? (Yes/No)
6. Which of these is a valid variable name? (a) 1name (b) _name (c) if (d) @value
7. What will be the output of: print(2**3)?
8. What data type is: 12.5
9. Which function is used to take user input?
10. Which keyword is used to define a function?
11. What is the output: print('5' + '5')
12. What is the output: print(5 + 5)
13. Can variables store different data types at different times? (Yes/No)
14. What is the purpose of 'if' statement?
15. Which library is used for machine learning in Python?
16. Write one Python web framework.
17. Name one Python data science library.
18. Write the correct syntax to import a module named math.
19. What does '==' operator do?
20. What will be the output: x=5; y=10; x,y=y,x; print(x,y)
Section B – Subjective Questions (30 marks)
1. Write a Python program to input 3 numbers and print the largest. (5 marks)
2. Write a Python program to check if a number is prime or not. (5 marks)
3. Write a Python program to display multiplication table of any number. (5 marks)
4. Write a Python program that takes marks of 5 subjects and prints average, total, and grade
(A/B/C). (5 marks)
5. Explain 5 key features of Python in detail. (5 marks)
6. Write a Python program that swaps two numbers without using a third variable. (5 marks)