Python Practical Programs
Grade IX
1. Write a program to check whether a number is positive, negative, or zero.
2. Write a program to check whether a number is even or odd.
3. Write a program to find the greater of two numbers.
4. Write a program to find the largest of three numbers.
5. Write a program to check whether a year is a leap year.
6. Write a program to check whether a person is eligible to vote.
7. Write a program to display grade based on marks:
o 90–100: A
o 75–89: B
o 50–74: C
o Below 50: Fail
8. Write a program to check whether a character is a vowel or consonant.
9. Write a program to calculate electricity bill based on units consumed using conditions.
Assumed Tariff
First 100 units → ₹1.50 per unit
Next 100 units (101–200) → ₹2.50 per unit
Above 200 units → ₹4.00 per unit
10. Write a program to check whether a number is divisible by 5 and 11.
11. Write a program to print numbers from 1 to 10 using a for loop.
12. Write a program to print even numbers from 1 to 50.
13. Write a program to print the multiplication table of a given number.
14. Write a program to create a list of 5 integers and display it.
15. Write a program to find the largest and smallest element in a list.
16. Write a program to count how many times a given element appears in a list.
17. Write a program to reverse a list.
18. Write a program to add elements to a list using append() and insert().
19. Write a program to remove elements from a list using remove() and pop().
20. Write a program to sort a list
21. Write a program to find the length of a list using len().
22. Write a program to merge two lists and display the final list.