0% found this document useful (0 votes)
14 views2 pages

Class 9 Python Practice Assignment Loops Heading

Uploaded by

jaat.study1
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views2 pages

Class 9 Python Practice Assignment Loops Heading

Uploaded by

jaat.study1
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Scholars Rosary Senior Secondary School

Class IX – AI(Py thon )


PYTHON PROGRAMS

Instructions:
• W rite Py thon programs for the follow in g question s.
• U se proper in den tation an d mean in gful variable n ames.

Questions:
1. W rite a program to en ter the age of a person an d check w hether the
person is eligible for votin g or n ot.
2. W rite a program to en ter the year an d check w hether it is a leap year or
n ot.
3. W rite a program to fin d the greatest out of tw o n umbers.
4. W rite a program to fin d the greatest out of three n umbers.
5. W rite a program to en ter the studen t’s n ame, roll n umber, an d mark s in
three subjects, calculate the total mark s, an d display the grade.
6. W rite a program in Py thon to create a variable that accepts the radius of
a circle. U se con dition al statemen ts to check w hether the radius is even or
n ot. If the radius is even , display the area of the circle; other w ise, display
the circumferen ce of the circle.
7. W rite a program in Py thon IDLE to accept the age of a person en tered by
the user an d check w hether he/she is a sen ior citizen or n ot.
8. W rite a program in Py thon to check w hether the en tered n umber is
divisible by 11 or n ot.
9. W rite a program in Py thon to prin t the area of a rectan gle if the len gth
value is greater than the breadth value; other w ise, prin t the area of a square
usin g the len gth value as its side.

Loop- Based Questions


10. W rite a program to prin t the first 10 n atural n umbers usin g a for loop.
11. W rite a program to prin t even n umbers till 20 usin g a for loop.
12. W rite a program to prin t odd n umbers till 20 usin g a for loop.
13. W rite a program to add odd n umbers till 20 usin g a for loop.
14. W rite a program to add the first 10 n atural n umbers usin g a for loop.
15. W rite a program to prin t the multiplication table of 23 usin g a for loop.
*NOTE- Practice all the programs of for loop usin g w hile loop also.

You might also like