1.
Write a program to input a number and
print its square if it is odd, otherwise print
its square root.
2. Write a program to input a number and
check whether it is positive, negative or
zero.
3. Write a program to input percentage
marks of a student and find the grade as per
the following criterion:
Marks Grade
>=90 A
75-90 B
60-75 C
Below 60 D
4. Write a program to enter a number and
check if it is a prime number or not.
5. Write a program to display a menu for
calculating the area of the circle or
perimeter of the circle.
6. Write a program that reads two
numbers and an arithmetic operator and
displays the computed result.
7. Write a program to print whether a
given character is an uppercase or a
lowercase character or a digit or any other
character.
8. Write a program to calculate and print
the roots of a quadratic equation
ax²+bx+c=0.(a≠0)
9. Write a program to print the sum of
natural numbers between 1 to 7. Print the
sum progressively i.e. after adding each
natural number, a print sum so far.
10. Write a program to calculate the
factorial of a number.
11. Write a program to create a triangle of
stars using a nested loop.
12. Write a Python script to print Fibonacci
series’ first 20 elements.
13. Write a program to read an
integer>1000 and reverse the number.
14. Input three angles and determine if they
form a triangle or not.