Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

ASSIGNMENT

1. WAP to print all even and odd numbers between 1 and 100;
2. WAP to print all even and odd numbers between 100 and 1;
3. WAP to print sum of numbers from 1 and 100;
4. WAP to print sum of the following series: 12+22+32+…...+102;
5. WAP to print calculate the factorial of number entered through keyboard;
6. WAP to check prime number entered through keyboard.
7. Write a Python program that prints all the numbers from 0 to 6 except 3 and 6.
Note: Use 'continue' statement.
8. Write a Python program to get the Fibonacci series between 0 to 50.
Note : The Fibonacci Sequence is the series of numbers :
0, 1, 1, 2, 3, 5, 8, 13, 21, ....
Every next number is found by adding up the two numbers before it.
9. Calculate the cube of all numbers from 1 to a given number.

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

For example, the number is 75869, so the output should be 5.

You might also like