Program List
If-elif-else
1. Accept marks of 5 subjects. Calculate total, average, percentage and
display the grade. Grade Distribution: 85-100 (A), 84-70 (B), 69-55
(C), 54-40 (D), 39-0 (E)
2. Given number is odd or even.
3. Given number is positive, negative or zero.
4. Maximum (greatest) & Minimum (smallest) number among 3 numbers.
5. Accept a person's age and decide whether the person is child,
teenager, adult or senior citizen.
6. Check whether a year is Leap year or not.
7. Check whether a character is a consonant or vowel.
8. Accept marks of student and print 'Pass' or 'Fail' (pass marks >=
40).
9. Calculate electricity bill based on units consumed.
Rate as per unit consumed:- 1-100 units = ₹5/unit, 101-200 = ₹7/unit,
above 200 units = ₹10/unit.
10. Wap to find the Ascii value of a letter.
11. Wap to swap numbers (using 3rd variable & without using 3rd variable)
12. Wap to find the square & cube of a number.
13. Wap to find the square root, power of a number.
14. Wap to find simple interest and compound interest.
15.
While loop
16. Print numbers from 1 to 10 using while loop.
17. Print multiplication table of a given number using while loop.
18. Reverse a number entered by the user using while loop.
19. Find the sum of digits of a number using while loop.
20. Factorial of a number using while loop.
21. Display even and odd numbers between 1 and 50 using while loop.
22. Sum of first N natural numbers using while loop.
For Loop
23. Print squares of numbers from 1 to 10 using for loop.
24. Print multiplication table of a given number using for loop.
25. Print all vowels in a word using for loop.
26. Count the number of vowels in a string using for loop.
27. Prime numbers from 1 to 50 using for loop.
28. Sum of first N even numbers using for loop.
Common Programs
29. Wap to create a menu driven calculator.
30. Wap to check whether a number is an Armstrong or not.
31. Wap to check whether a number is Perfect number or not.
32. Wap to check whether a number is Strong number or not.
33. Wap to check whether two numbers are Amicable numbers or not.
34. Wap to generate Fibonacci series upto N value.
35. Wap to check whether a number is Palindrome or not.
36. Wap to find the LCM of given numbers.
37. Wap to find the HCF of given numbers.
Conversion Programs
38. Wap to convert Centimeters to feet and inches.
39. Wap to convert Fahrenheit to Celsius and Vice versa.
40. Wap to convert
41. Wap to convert
Shapes Program
42. Wap to find the area and perimeter of a square.
43. Wap to find the area and perimeter of a rectangle.
44. Wap to find the area and perimeter of a triangle.
45. Wap to find the area and perimeter of a circle.
String Programs
46. Wap to find the length of the string.
47. Wap to check whether a string is Palindrome or not.
48. Wap to reverse a string.
49. Wap to count the number of characters and words in a string.
50. Wap to count the number of lowercase and uppercase letters in a
string.
51. Wap to check whether given strings are anagram or not.
52. Wap to count the occurrence of each word in a string.
53. Wap to swap the 1st and last character of a string.
54. Wap to replace every blank space with a hyphen in a string.
List Programs
Tuple Programs
Dictionary Programs
File Handling Programs
Exception Handling Programs
Pattern Programs