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

Loops Assignment

This document outlines assignments for writing Python programs to perform various operations using loops. It includes tasks to print numbers and letters in sequences, find sums and products of numbers, check number properties like palindromes, prime numbers, Armstrong numbers etc. and print series like Fibonacci up to a specified number of terms.

Uploaded by

Nitin
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)
34 views2 pages

Loops Assignment

This document outlines assignments for writing Python programs to perform various operations using loops. It includes tasks to print numbers and letters in sequences, find sums and products of numbers, check number properties like palindromes, prime numbers, Armstrong numbers etc. and print series like Fibonacci up to a specified number of terms.

Uploaded by

Nitin
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
You are on page 1/ 2

Python Loops

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

❏ Write a Python program to enter a number and print it in words.


❏ Write a Python program to print all ASCII characters with their values.
❏ Write a Python program to find power of a number using a loop.
❏ Write a Python program to find all factors of a number.
❏ Write a Python program to calculate the factorial of a number.
❏ Write a Python program to find HCF (GCD) of two numbers.
❏ Write a Python program to find LCM of two numbers.
❏ Write a Python program to check whether a number is Prime number or not.
❏ Write a Python program to print all Prime numbers between 1 to n.
❏ Write a Python program to find the sum of all prime numbers between 1 to n.
❏ Write a Python program to find all prime factors of a number.
❏ Write a Python program to check whether a number is an Armstrong number or
not.
❏ Write a Python program to print all Armstrong numbers between 1 to n.
❏ Write a Python program to check whether a number is a Perfect number or not.
❏ Write a Python program to print all Perfect numbers between 1 to n.
❏ Write a Python program to check whether a number is a Strong number or not.
❏ Write a Python program to print all Strong numbers between 1 to n.
❏ Write a Python program to print Fibonacci series up to n terms.

You might also like