Grade 7 Python Programs
linear, simple IF and nested IF:
1. Write a python program to print name, age and height using different data types
2. Write a python program and display all arithmetic operators
3. Write a python program to check if a given number is even or odd
4. Write a python program to check if a year is leap or non-leap year
5. Write a python program to calculate area and perimeter of rectangle
6. Write a python program to calculate average of three numbers
7. Write a python program to print the greatest of two numbers
8. Write a python program to print the greatest of three numbers
9. Write a python program to check if a given number is positive, negative or zero
10. Write a python program and display “pass” or “fail” based on score. If score 35 and
above display pass.
11. Write a python program to convert temperature Celsius to Fahrenheit
12. Write a python program to validate the username as “Admin” and password as
“Manthan@123”
13. Write a python program to read 3 subject and display the Grade based on average
Average above 90 A*
Average above 80 A
Average above 70 B
Average above 60 C
Average above 50 D
Below 50 fail
14. Write a python program to find out the complementary angle
Constants:
1. Calculate the area and circumference of a circle
2. Calculate GST 18% on the product purchased
3. Calculate INR for the given US dollar where INR is 84.16
4. Calculate final cost where the discount is 20% if the product cost is 2000 and above
and 10% discount if the product cost is 1000 and above and apply tax of 5%
5. Write a Python program to calculate the Simple Interest given the principal amount,
time (in years), and a constant interest rate of 5%. (SI – amount * time * interest
rate)
6. Write a Python program to convert hours to seconds using the constant
SECONDS_IN_HOUR = 3600.
For loop:
1. print the characters of a string (vertically and horizontally)
2. print the numbers 1-10
3. print the numbers in revers order 10-1
4. print even numbers from 1 to 20
5. print the odd numbers from 1 to 20
6. print the sum of first 10 natural numbers
7. print the sum of even numbers
8. print the sum of odd numbers
9. sum of first 10 natural numbers
10. read the start and stop numbers and print the numbers between them
11. write a program to take 7 numbers as input from user and print their total
12. Write a program to read 3 subject marks(using loop) and calculate average
13. print the squares till the number you enter
14. print the cubes till the number you enter
15. Print numbers divisible by 3 and 5 in the given range
16. Print numbers divisible by 3 or 5 in the given range
17. Print numbers from 1 to 30 that are divisible by 3 but not by 6
18. Count how many numbers from 1 to 100 are even or divisible by 7
19. Write a Python program to count how many numbers between 1 and 50 are divisible
by 3.
20. factors of a given number
21. factorial of a given number
22. multiplication table for a given number