Welcome to the Basic Python Programs repository! This repository is designed to serve as a comprehensive collection of fundamental Python programs, catering to beginners and anyone looking to refresh their Python skills. Whether you're new to programming or looking to practice your Python coding skills, you'll find a variety of simple, well-documented programs here.
The repository is organized into directories, each containing programs related to specific topics or problem types. Here's an overview of the structure These projects include these following topics:
- 01_Basics
- Hello World
- Variables and Data Types
- Basic Input/Output
- Comments
- 02_Operators
- Arithmetic Operators
- Relational Operators
- Logical Operators
- Bitwise Operators
- Assignment Operators
- Special Operators
- 03_Control_Structures
- If Statements
- If-Else Statements
- Nested If-Else
- Loops (For, While)
- 04_Functions
- Defining Functions
- Function Arguments
- Return Statement
- Lambda Functions
- 05_Data_Structures
- Lists
- Tuples
- Dictionaries
- Sets
- 06_Strings
- String Operations
- String Methods
- String Formatting
- 07_Files
- Reading Files
- Writing Files
- File Methods
- 08_Exceptions
- Try-Except Blocks
- Finally Block
- Custom Exceptions
To get started with this repository:
-
Clone the repository:
git clone https://github.com/yourusername/basic-python-programs.git cd basic-python-programs -
Explore the directories and files: Each directory contains multiple Python files focusing on a particular topic. Open any file to view and run the code.
-
Run a program: You can run any of the programs using Python from your command line:
python filename.py
Contributions are welcome! If you have any basic Python programs that you'd like to add, feel free to fork the repository, add your program, and submit a pull request.
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch). - Commit your changes (
git commit -m 'Add some feature'). - Push to the branch (
git push origin feature-branch). - Open a pull request.
This repository is licensed under the MIT License. See the LICENSE file for more information.
Thanks to everyone who has contributed to and supported this project. Your efforts make learning Python easier for everyone.
We hope you find this repository helpful. Happy coding!