Python Question Paper
Max Marks: 50
Section A – Short Answer (2 × 5 = 10 Marks)
• 1. Write a Python function is_even(n) that returns True if a number is even, else False. (2
Marks)
• 2. Use a for loop to print the first 10 natural numbers. (2 Marks)
• 3. Write a Python program using if-else to check whether a person is eligible to vote (age ≥ 18).
(2 Marks)
• 4. Write a Python program using a for loop to print all numbers from 1 to 20 that are divisible by
3. (2 Marks)
• 5. Define a simple Car class with attributes brand and model. Create an object and print details.
(2 Marks)
Section B – Problem Solving (4 × 5 = 20 Marks)
• 6. Write a Python function factorial(n) that calculates factorial of a number using a for loop. (5
Marks)
• 7. Write a program to read 5 integers from the user and print only the positive numbers using a
for loop and if condition. (5 Marks)
• 8. Create a Python class Student with attributes name, marks. Add a method to display name
and average of marks. Create 2 objects and print details. (5 Marks)
• 9. Write a program using a for loop to print the multiplication table of any number entered by the
user. (5 Marks)
Section C – Long Answer (2 × 10 = 20 Marks)
• 10. Write a Python program that:
- Takes a list of numbers from the user
- Separates even and odd numbers into two new lists
- Prints both lists
(Use for loop + if-else + functions) (10 Marks)
• 11. Design a Python class BankAccount with:
- Attributes: account_holder, balance
- Methods: deposit(amount), withdraw(amount), display()
- Create an object and perform deposit, withdraw, and display balance. (10 Marks)