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

Python 50 Basic Problems

The document lists 50 beginner-level Python practice problems designed to enhance programming skills. Problems include basic operations, data structures, file handling, and object-oriented programming concepts. Each problem encourages the application of fundamental Python concepts and techniques.

Uploaded by

hackergang8905
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
106 views2 pages

Python 50 Basic Problems

The document lists 50 beginner-level Python practice problems designed to enhance programming skills. Problems include basic operations, data structures, file handling, and object-oriented programming concepts. Each problem encourages the application of fundamental Python concepts and techniques.

Uploaded by

hackergang8905
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

50 Python Beginner Practice Problems

1. Swap two numbers

2. Convert Celsius to Fahrenheit

3. Check if a number is even or odd

4. Print numbers from 1 to N using a loop

5. Find the factorial of a number

6. Check if a number is prime

7. Generate Fibonacci series up to N terms

8. Reverse a string

9. Count vowels in a string

10. Check if a string is a palindrome

11. Find maximum number in a list

12. Find minimum number in a list

13. Remove duplicates from a list

14. Sort a list in ascending order

15. Find the sum of elements in a list

16. Find the average of elements in a list

17. Count frequency of elements in a list

18. Merge two lists

19. Find the intersection of two lists

20. Create a dictionary with frequency of characters in a string

21. Swap keys and values in a dictionary

22. Check if a key exists in a dictionary

23. Add a new key-value pair to a dictionary

24. Remove a key from a dictionary


25. Get all keys from a dictionary

26. Get all values from a dictionary

27. Write a function to return square of a number

28. Write a function to return sum of two numbers

29. Write a function to check prime number

30. Write a function to reverse a string

31. Read content from a text file

32. Write content to a text file

33. Count number of lines in a file

34. Count number of words in a file

35. Use try-except block to catch division by zero

36. Create a class with attributes and methods

37. Inherit from a parent class

38. Create a list of even numbers using list comprehension

39. Create a multiplication table using nested loops

40. Calculate power of a number using recursion

41. Print pattern: star triangle

42. Check if a number is an Armstrong number

43. Find the GCD of two numbers

44. Find the LCM of two numbers

45. Convert decimal to binary

46. Convert binary to decimal

47. Check if year is leap year

48. Find second largest number in a list

49. Find the sum of digits of a number

50. Count occurrences of each word in a sentence

You might also like