50 Python Practice Problems with Links
1. Print even/odd numbers in a range
[Link]
2. Factorial using recursion
[Link]
3. Fibonacci sequence
[Link]
4. Sum of digits
[Link]
5. Palindrome check
[Link]
6. Prime number checker
[Link]
7. Reverse a string
[Link]
8. Count vowels in a string
[Link]
9. Check Armstrong number
[Link]
10. Find GCD of two numbers
[Link]
11. Swap two variables
[Link]
12. Largest of three numbers
[Link]
13. Sum of list elements
[Link]
14. Second largest number in list
[Link]
15. Remove duplicates from list
[Link]
16. Merge two sorted lists
[Link]
17. Frequency of elements in list
[Link]
18. Matrix addition
[Link]
19. Print pattern of stars
[Link]
20. Diamond pattern
[Link]
21. List comprehension basics
[Link]
22. Flatten a nested list
[Link]
23. Multiply all digits of number
[Link]
24. Check anagram
[Link]
25. Count letters and digits
[Link]
26. Sum of elements at even positions
[Link]
27. Binary to decimal converter
[Link]
28. Character frequency in string
[Link]
29. Sort string alphabetically
[Link]
30. Replace substring in string
[Link]
31. Create dictionary from two lists
[Link]
32. Count words in a sentence
[Link]
33. Simple calculator program
[Link]
34. File handling: Read file
[Link]
35. OOP: Class and object example
[Link]
36. OOP: Inheritance
[Link]
37. Exception handling example
[Link]
38. Use lambda with map
[Link]
39. Filter prime numbers
[Link]
40. Use reduce to compute sum
[Link]
41. Generate random OTP
[Link]
42. Shuffle elements of list
[Link]
43. Remove punctuation from string
[Link]
44. Leap year checker
[Link]
45. Rock paper scissors game
[Link]
46. Simple contact book using dict
[Link]
47. Reverse words in sentence
[Link]
48. Find longest word in string
[Link]
49. Count frequency of characters
[Link]
50. Password validator
[Link]
Mini Projects with Descriptions and Hints
1. Student Report Card Manager (Python)
Description:
Create a CLI or simple Tkinter app that allows you to store student marks, calculate total/percentage, and
print grade.
Hints:
- Use classes for student data
- Store records in file or dict
- Add functions for add/view/delete
2. Personal Portfolio Website (HTML/CSS)
Description:
Build a fully responsive personal website with sections like About Me, Projects, Skills, and Contact.
Hints:
- Use Flexbox or Grid for layout
- Add external CSS file
- Use real content and host on GitHub Pages
3. ToDo List App (JS + HTML/CSS)
Description:
Build a dynamic app to add, edit, delete, and mark tasks as complete using JavaScript DOM manipulation.
Hints:
- Use localStorage to store tasks
- Use event listeners (click, input)
- Use array to manage task list