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

Python Loop Questions

The document contains a list of practical Python programming questions focused on loops. It includes tasks such as printing numbers, calculating sums, finding prime numbers, and manipulating lists. Each question is designed to enhance understanding and application of loop constructs in Python.

Uploaded by

amyquueen
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)
3 views2 pages

Python Loop Questions

The document contains a list of practical Python programming questions focused on loops. It includes tasks such as printing numbers, calculating sums, finding prime numbers, and manipulating lists. Each question is designed to enhance understanding and application of loop constructs in Python.

Uploaded by

amyquueen
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

Python loop

Python Loop Practical Questions

1. Write a Python program to print numbers from 1 to 10.

2. Write a Python program to print even numbers between 1 and 20.

3. Write a Python program to print odd numbers between 1 and 20.

4. Write a Python program to print the multiplication table of a given number.

5. Write a Python program to calculate the sum of numbers from 1 to 100.

6. Write a Python program to calculate the factorial of a given number.

7. Write a Python program to print squares of numbers from 1 to 10.

8. Write a Python program to print cubes of numbers from 1 to 10.

9. Write a Python program to print the first 15 Fibonacci numbers.

10. Write a Python program to count the number of vowels in a given string.

11. Write a Python program to print numbers from 1 to 10.

12. Write a Python program to reverse a given number.

13. Write a Python program to check if a number is prime.

14. Write a Python program to keep asking the user for input until they type "exit".

15. Write a Python program to calculate the product of digits of a number.

16. Write a Python program to check if a number is a palindrome using a loop.

17. Write a Python program to print all multiples of 5 less than 100.

18. Write a Python program to simulate a countdown timer from 10 to 1.

19. Write a Python program to print a multiplication table from 1 to 10.


20. Write a Python program to print all prime numbers between 1 and 50 using nested loops.

21. Write a Python program to find the largest number in a list using a loop.

22. Write a Python program to find the smallest number in a list using a loop.

23. Write a Python program to calculate the sum of elements in a list using a loop.

24. Write a Python program to count how many times a word appears in a list.

25. Write a Python program to find the second largest number in a list using a loop.

26. Write a Python program to sort a list in ascending order using loops only (no built-in
functions).

You might also like