Python programs
1.Write a program to accepts two integers and print their sum.
2. Write a program that accepts radius of a circle and prints its area.
3. Write a program that accepts base and height and calculate the area of
triangle.
4. Write a program that inputs a student’s marks in three subjects (out of
100) and
prints the percentage marks.
5. Write a program to compute area of square and triangle.
6. Write a program to calculate simple interest.
7. Write a program to read two numbers and prints their quotient and
reminder.
8. Write a program to find whether a given number is even or odd.
9. Write a program to find largest among three integers.
10.Write a program to find lowest among three integers.
11.Write a program that accepts length and breadth of rectangle and
calculate its
area.
12. Write a program to accept the marks of five subjects and calculate the
average
marks.
13.Write a program to accept the height in cm and convert it into feet and
inches.
14.Write a program that accepts the age and print if one is eligible to vote or
not.
15.Write a program that accepts two numbers and check if the first number
is fully
divisible by second number or not.
16.Write a program to read base, width and height of parallelogram and
calculate its area and perimeter.
17.Write a program to accept the year and check if it is a leap year or not.
18. Write a program to input a number and print its square if it is odd,
otherwise
print its square root.
19.Write a program to input a number and check whether it is positive,
negative or
zero.
20. Write a program to input a number and print its square if it is odd,
otherwise
print its square root.
21.Write a program to input a number and check whether it is positive,
negative or
zero.
22.Write a program to input percentage marks of a student and find the
grade as
per following criterion:
Marks Grade
>=90 A
75-90 B
60-75 C
Below 60 D
24.Write a program to enter a number and check if it is a prime number or
not.
25.Write a program to display a menu for calculating area of circle or
perimeter of
the circle.