35 Important For loop Programs in Python (Solved) Class 11

Share with others

for loop programs in python
for loop programs in python

For loop Programs in Python

Q1. Write a program to print the following using for loop

a. First 10 Even numbers

b. First 10 Odd numbers

c. First 10 Natural numbers

d. First 10 Whole numbers

Q2. Write a program to print first 10 integers and their squares like

1 1

2 4

3 9 and so on

For loop Programs in Python

Q3. Write for loop statement to print the following series:

10, 20, 30 … … 300

Q4. Write a for loop statement to print the following series

105, 98, 91 ………7


For loop Programs in Python

Q5. Write a program to print first 10 natural number in reverse order.

Q6. Write a program to print sum of first 10 Natural numbers.

For loop Programs in Python

Q7. Write a program to print sum of first 10 Even numbers.

Q8. Write a program to print table of a number entered from the user.

For loop Programs in Python

Q9. Write a program to display all even numbers that falls between two numbers (exclusive both numbers) entered from the user.

Q10. Write a program to check whether a number is prime or not.

For loop Programs in Python

Q11. Write a program to find the sum of the digits of a number accepted from the user.


Q12. Write a program to find the product of the digits of a number accepted from the user.

For loop Programs in Python

Q13. Write a program to reverse the number accepted from user.

Q14. Write a program to display the number names of the digits of a number entered by user, for example if the number is 231 then output should be Two Three One

For loop Programs in Python

Q15. Write a program to print the Fibonacci series till n terms (Accept n from user)

Q16. Write a program to print the factorial of a number accepted from user.

For loop Programs in Python

Q17. Write a program to check whether a number is Armstrong or not. (Armstrong number is a number that is equal to the sum of cubes of its digits for example : 153 = 1^3 + 5^3 + 3^3.)

Q18. Write a program to convert binary to decimal.


For loop Programs in Python

Q19. Write a program to add first n terms of the following series using a for loop:

1/1! + 1/2! + 1/3! + …….. + 1/n!



Q20. Write a program to check whether a number is palindrome or not.

For loop Programs in Python

Q21. Write a python program  to sum the sequence:
1 + 1/1! + 1/2! + 1/3! + …….. + 1/n!

Q22. Write a program to accept 10 numbers from the user and display it’s average.

For loop Programs in Python

Q23. Write a program to accept 10 numbers from the user and display the largest & smallest number number.

Q24. Write a program to display sum of odd numbers and even numbers separately that fall between two numbers accepted from the user.(including both numbers)

For loop Programs in Python

Q25. Write a program to display all the numbers which are divisible by 13 but not by 3 between 100 and 500.

Q26. Write a program to print the following series till n terms.

2 , 22 , 222 , 2222 _ _ _ _ _ n terms

For loop Programs in Python

Q27. Write a program to print the following series till n terms.

1 4 9 16 25 _ _ _ _ _ n terms

Q28. Write a program to find the sum of the following series(accept values of x and n from user)

1 + x/1! + x2/2! + ……….xn/n!

For loop Programs in Python

Q29. Write a program to find the sum of following series :

x + x2/2 + ……….xn/n



Q30. Write a program to find the sum of following series

1 + 8 + 27 …………n terms

For loop Programs in Python

Q31. Write a program to find the sum of following series:

1 + 2 + 6 + 24 + 120 . . . . . n terms

Q32. Write a program to find the sum of following series:

S = 1 + 4 – 9 + 16 – 25 + 36 – … … n terms

For loop Programs in Python

Q33. Write a Program to print all the characters in the string ‘COMPUTER’ using for loop.

Q34. Write a program to print only odd numbers from the given list using for loop. L = [23, 45, 32, 25, 46, 33, 71, 90]

For loop Programs in Python

Q35. Write a program to print all the factors of a number using for loop.

For loop Programs in Python


Disclaimer : I tried to give you the correct Solution of “For Loop Programs in Python” , but if you feel that there is/are mistakes in the solution of “For Loop Programs in Python given above, you can directly contact me at csiplearninghub@gmail.com.


Class 12 Computer Science Sample Paper 2020-2021.

Class 12 Computer Science Sample Paper Marking Scheme

Class 12 Computer Science Test Series


Share with others

Leave a Reply

error: Content is protected !!