Loops Assignment
Loops Assignment
Assignment
❏ Write a Python program to print all natural numbers from 1 to n. - using while loop
❏ Write a Python program to print all natural numbers in reverse (from n to 1). - using
while loop
❏ Write a Python program to print all alphabets from a to z. - using while loop
❏ Write a Python program to print all even numbers between 1 to 100.
❏ Write a Python program to print all odd numbers between 1 to 100.
❏ Write a Python program to find the sum of all natural numbers between 1 to n.
❏ Write a Python program to find the sum of all even numbers between 1 to n.
❏ Write a Python program to find the sum of all odd numbers between 1 to n.
❏ Write a Python program to print a multiplication table of any number.
❏ Write a Python program to count the number of digits in a number.
❏ Write a Python program to find the first and last digit of a number.
❏ Write a Python program to find the sum of the first and last digit of a number.
❏ Write a Python program to calculate the sum of digits of a number.
❏ Write a Python program to calculate the product of digits of a number.
❏ Write a Python program to enter a number and print its reverse.
❏ Write a Python program to check whether a number is palindrome or not.
❏ Write a Python program to find the frequency of each digit in a given integer.
2