The document contains a list of 47 Python programming exercises designed to practice basic programming concepts. The exercises cover various topics such as arithmetic operations, conditional statements, loops, and functions, with specific tasks like calculating simple interest, checking for prime numbers, and manipulating strings. Each exercise is presented as a 'Write a Program' (WAP) prompt, encouraging hands-on coding experience.
The document contains a list of 47 Python programming exercises designed to practice basic programming concepts. The exercises cover various topics such as arithmetic operations, conditional statements, loops, and functions, with specific tasks like calculating simple interest, checking for prime numbers, and manipulating strings. Each exercise is presented as a 'Write a Program' (WAP) prompt, encouraging hands-on coding experience.
Q1. WAP to display adding two numbers, if numbers are
20 & 40. Q2. WAP to display addition, subtraction, multiplication, division; if numbers are 20 & 2. Q3. WAP to input value from user & display adding two number. Q4. WAP to input 3 subject marks of a student & display total and percentage. Q5. WAP to input Principle, Rate, Time & display Simple Interest. Q6. WAP to input two numbers & swap them. Q7. WAP to input two numbers & swap them without using third variable. Q8. WAP to input a number and check it is positive or not. Q9. WAP to input two numbers and check both are equal or not. Q10. WAP to input an amount, if amount is greater than 8000 than calculate 5% discount and display net amount. Q11. WAP to input an alphabet & check, it is an uppercase or lowercase. Q12. WAP to input an alphabet if it is in uppercase convert into lowercase & vice-versa. Q13. WAP to input an alphabet & check whether it is a vowel or a consonant. Q14. WAP to input a number & check its range as follows:- 1-10 = “range b/w 1 to 10” 11-20 = “range b/w 11 to 20” 21-30 = “range b/w 21 to 30” Above 30 = “out of range” Q15. WAP to input a character & check it is an alphabet, digit, or symbol. Q16. WAP to input 3 sides of a triangle & check it is equilateral, isosceles, or scalene triangle. Q17. WAP to input 3 numbers & find smallest. Q18. WAP to input a no. & check it is a single digit, double digit, or triple digit. Q19. WAP to input 4 subject marks of a student & display total, percentage, & grade as follows:- Above 90 = grade ‘A’ Above 80 = grade ‘B’ Above 70 = grade ‘C’ Above 60 = grade ‘D’ Else = grade ‘E’ Q20. WAP to input a number if number is positive than input another number, if second number is even than do the addition otherwise print a msg. Q21. WAP to input 2 numbers 5 times & display their addition. Q22. WAP to input 10 numbers & display their addition. Q23. WAP to input 10 numbers & display addition of even & odd numbers. Q24. WAP to input 10 numbers & display addition of positive & negative numbers. Q25. WAP to input 10 numbers & display addition of single digit number, double digit number, triple digit number. Q26. WAP to input 10 character & count total alphabet, digit, symbol. Q27. WAP to input a number & print its factorial. Q28. WAP to input a number & power; calculate the power raised to the number. Q29. WAP to input a number & print its table. Q30. WAP to input a number & print its factors. Q31. WAP to input a number & display addition of factors. Q32. WAP to input a number & count its factors. Q33. WAP to input a number & check it is perfect or not. Q34. WAP to input 10 numbers & find largest. Q35. WAP to input 10 numbers & find smallest. Q36. WAP to input a number & check it is prime or not. Q37. WAP to input a 4 digit number & display addition of all digits. Q38. WAP to input no. of days & find total no. of years, months, weeks, & remaining days. Q39. WAP to input a number & display addition of all digits. Q40. WAP to input a number & display addition of digit’s cube. Q41. WAP to input a number & check it is Armstrong or not. Q42. WAP to input a 5 digit number & display addition of first & last digit, multiplication of second & fourth digit. Q43. WAP to input a 4 digit number & display in reverse order. Q44. WAP to input an amount & find total notes of 2000, 500, 200, 100. Q45. WAP to input a number & check it is neon or not. Q46. WAP to input a number & check it is palindrome or not. Q47. WAP to input a number & find smallest & largest digits.