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

Python list of programs

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

Assignment -1 (Programming using Python)

WAP to print Hello-World!!

WAP to swap values among two variables

WAP to swap values using an extra variable.

WAP to do various arithmetical operations {add, sub, mul, div }

WAP to check if a no is positive, negative or zero.

WAP to find ASCII values of a character.

WAP to check if it’s a leap year or not.

WAP to check whether a no is odd/even.

WAP to check whether a no is prime or not.

WAP to find all prime numbers within a range.

WAP to print the table of any no in the below format

WAP to check for the Armstrong number {407,157} 407= 4^3+0^3+7^3= 64+0+349=407}

WAP to check for the Disarium number. {175= 1^1 + 7^2+ 5^3= 1+49+125=175}

WAP to find LCM and HCF of a given no.

WAP to use break and continue statements.

WAP to check greatest/smallest of the three numbers.

WAP to check 2nd greatest/smallest of the three numbers.

WAP to get the factorial of a number.

WAP for Fibonacci series.

WAP to check if a no is palindrome or not.


WAP to find the sum of natural no/ odd no/ even no/ specific no.

WAP to check the length of a string.

WAP to reverse a string.

WAP to sort words in an alphabetical order.

WAP to swap adjacent letters in a string. { Eg: string will become tsirgn }

WAP to get the grade if random marks are entered.

90>= O

80>= A+

70>= A

60>= B+

50>= B

40>= C

Below 40 means Fail

You might also like