Loop Task

Programming Questions

1. Write a  program to find the even number using for loop.

2. Write a program to find the odd number using a while loop

3. Write a program to find the 10 natural numbers using a while loop.

4. Write a program to calculate the sum 1 all numbers 1 to the given number

5. Write a program to create a table

6. Write a program to count the total number of digits in a number

7. Write a program and create the triangle pattern for numbers

8. Write a program to reverse to list using a loop

9. Write a program to display the numbers -20 to -1 to use for the loop

10. Write a program to display  all prime numbers within a range

11. Write a program to display the Fibonacci series up to 10 terms 

12. Write a program to find the factorial of a given number

13. Write a program to create a pattern 

14. Write a program to find the sum of the series upto n terms

15. Write a program the cube of all numbers from 1 to a given  number

Theory Questions

1. What are loops.

2. What is the type of loops.

3. What is a While loop. How to use it?

4. What is for loop .How to use it?

5. What is a nested loop. How to use it?

6. What is a while with else. How to use it?

7.What is the range() function

8. What is the else in for loop

9. What is the difference between a for loop and a while loop?

10. How can I use a break statement in loops?