Skip to content

mausam-giri/Learn-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Python Practice Programs

This repository contains a collection of Python programs designed for practice and learning. Each program is a simple Python script that covers a specific topic or problem. This README serves as an index to help you navigate and use the programs effectively.

Table of Contents

Programs

Print "Hello, World!" to the console.

2. Calculate the Sum

Calculate and print the sum of two numbers.

3. Check Even or Odd

Determine if a number is even or odd.

4. Basic Calculator

Build a basic calculator that performs addition, subtraction, multiplication, and division.

5. Area of a Circle

Calculate and print the area of a circle.

6. Convert Celsius to Fahrenheit

Convert a temperature in Celsius to Fahrenheit.

7. Check Leap Year

Determine if a year is a leap year.

8. Simple Interest Calculator

Calculate simple interest given the principal, rate, and time.

9. Check Prime Number

Determine if a number is prime or not.

10. Factorial of a Number

Calculate the factorial of a given number.

11. Print Fibonacci sequence

Generate and print the Fibonacci sequence up to a specified number of terms.

12. Reverse a String

Reverse a given string.

13. Check Palindrome

Determine if a string is a palindrome.

14. Count Vowels and Consonants

Count the number of vowels and consonants in a string.

15. Find Maximum and Minimum

Find the maximum and minimum values in a list of numbers.

16. List Comprehension

Use list comprehension to create a list of squares of numbers from 1 to 10.

17. Check Anagrams

Determine if two strings are anagrams of each other.

18. Remove Duplicates

Remove duplicates from a list.

19. Linear Search

Implement linear search to find an element in a list.

20. Binary Search

Implement binary search to find an element in a sorted list.

21. Bubble Sort

Implement the bubble sort algorithm to sort a list of numbers.

22. Selection Sort

Implement the selection sort algorithm to sort a list of numbers.

23. Insertion Sort

Implement the insertion sort algorithm to sort a list of numbers.

24. Factorial Using Recursion

Calculate the factorial of a number using recursion.

25. Calculate GCD

Calculate the greatest common divisor (GCD) of two numbers.

26. Generate Prime Numbers

Generate and print prime numbers within a given range.

27. File Reading and Writing

Read data from a file, manipulate it, and write it back to a new file.

28. Count Words in a String

Count the number of words in a given string.

29. Convert Decimal to Binary

Convert a decimal number to binary.

30. Convert Binary to Decimal

Convert a binary number to decimal.

31. Find the Length of a List

Calculate the length of a list without using the built-in len function.

32. Calculate LCM

Calculate the least common multiple (LCM) of two numbers.

33. Check Armstrong Number

Determine if a number is an Armstrong number.

34. Generate Random Number

Generate a random number within a specified range.

35. Calculate Exponent

Calculate the result of raising a number to a specified exponent.

36. Check Perfect Number

Determine if a number is a perfect number.

37. Count Characters in a String

Count the occurrences of each character in a string.

38. Calculate Median

Calculate the median of a list of numbers.

39. Check Punctuation

Determine if a character is a punctuation symbol.

40. Calculate Area of a Triangle

Calculate and print the area of a triangle given its base and height.

41. Check Quadratic Equation Roots

Determine the roots of a quadratic equation.

42. Generate Random Password

Generate a random password of a specified length.

43. Calculate Simple Moving Average

Calculate the simple moving average of a list of numbers.

44. Check Perfect Square

Determine if a number is a perfect square.

45. Convert Kilometres to Miles

Convert a distance in kilometres to miles.

46. Check a Number is Positive, Negative, or Zero

Determine if a number is positive, negative, or zero.

47. Calculate Discount

Calculate the final price after applying a discount to an item's price.

48. Generate a List of Primes

Generate a list of prime numbers up to a specified limit using the Sieve of Eratosthenes.

49. Calculate Area of a Rectangle

Calculate and print the area of a rectangle given its length and width.

50. Calculate BMI (Body Mass Index)

Calculate and categorize BMI based on weight and height inputs.

51. Two-Wheelers and Four-Wheelers Manufacturing

The task is to find how many two-wheelers and four-wheelers need to manufacture as per the given data.

52. Parking Spaces

The task is to find the index of the row(R) in the parking that has the most parking spaces full (1).

53. Maximum Guests on Cruise

The task is to find the maximum number of guests present on the cruise at any given instance within T hours.

54. Eligibility to Vote

Make a program to check if a person is eligible to vote or not in India.

55. Draw a Colorful Pattern

Create a colorful pattern using the Turtle graphics library.

Usage

You can clone this repository and explore each program individually. Use these programs to practice Python and learn different concepts. Follow the specific program's instructions in its source code.

Contributing

If you have additional Python practice programs or improvements to existing ones, feel free to contribute to this repository by opening an issue or creating a pull request. Your contributions are highly appreciated, and they will help others learn and improve their Python skills.

Happy coding!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages