0% found this document useful (0 votes)
5 views

Python Exercises 1

Uploaded by

jangameshreya
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Python Exercises 1

Uploaded by

jangameshreya
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Exercise 1: Print first 10 natural numbers using while loop

Exercise 2: Print the following pattern

Exercise 3: Calculate sum of all numbers from 1 to a given number


Exercise 4: Print multiplication table of a given number
Exercise 5: Display numbers from a list using a loop
Exercise 6: Count the total number of digits in a number
Exercise 7: Print the following pattern

Exercise 8: Print list in reverse order using a loop


Exercise 9: Display numbers from -10 to -1 using for loop
Exercise 10: Display a message “Done” after the successful execution of the for loop
Exercise 11: Print all prime numbers within a range
Exercise 12: Display Fibonacci series up to 10 terms
Exercise 13: Find the factorial of a given number
Exercise 14: Reverse an integer number.
Exercise 15: Print elements from a given list present at odd index positions
Exercise 16: Calculate the cube of all numbers from 1 to a given number
Exercise 17: Find the sum of the series up to n terms. For example, if n = 5 the series will
become 2 + 22 + 222 + 2222 + 22222 = 24690
Exercise 18: Print the following pattern

You might also like