This repository contains a collection of 140+ Python programs covering a wide range of fundamental concepts and problem-solving techniques. It is designed to help beginners and intermediate learners strengthen their Python skills through hands-on practice.
This collection includes basic and intermediate Python programs that cover:
- Basic Syntax and Operations
- Mathematical Computations
- Conditional Statements and Loops
- Functions and Recursion
- Working with Lists, Tuples, and Dictionaries
- File Handling
- Object-Oriented Programming
- Algorithms and Problem Solving
Each program is written in a simple and structured way to help learners understand key programming concepts effectively.
Here are some of the topics covered:
-
Basic Python Programs
- Printing "Hello Python"
- Arithmetic operations (addition, division, etc.)
- Swapping variables with and without a temp variable
-
Mathematical Programs
- Finding the area of a triangle
- Checking if a number is prime
- Generating Fibonacci sequences
- Finding factorial using recursion
-
Conversions and Computations
- Converting kilometers to miles
- Converting Celsius to Fahrenheit
- Calculating LCM and HCF
- Finding the natural logarithm of a number
-
Data Structures & Operations
- Sorting words in alphabetical order
- Finding the largest/smallest number in a list
- Removing empty lists from a list
- Cloning or copying lists
-
Advanced Programs
- Checking Armstrong numbers
- Finding Happy numbers
- Generating Disarium numbers
- Matrix addition, multiplication, and transposition
-
Clone this repository:
git clone https://github.com/AbdullahRFA/140_Python_basic_program.git
-
Navigate to the project directory:
cd python-practice
-
Run any Python script:
python program_name.py
• Beginners looking to get started with Python programming • Students preparing for coding interviews • Developers who want to brush up on Python concepts
If you would like to contribute by adding more practice problems, feel free to fork this repository, make changes, and submit a pull request.
This project is licensed under the MIT License – you are free to use and modify the code.
Replace your-username
with your GitHub username before uploading it. Let me know if you need modifications! 🚀