---
📚 Lesson 1: Introduction to Python 📚Class 1: Introduction to Programming---
🔹
1. Introduction to ProgrammingWhat is Programming?- Programming is the process of writing instructions for a computer to perform specific tasks.
- Programs are written in programming languages, which are designed to be understood by both humans and machines.
Why Learn Programming?- Develop problem-solving skills.
- Automate repetitive tasks.
- Create software, websites, and applications.
- Programming is a valuable skill in many careers.
---
🔹
2. Introduction to PythonWhat is Python?- Python is a high-level, interpreted programming language.
- Known for its simplicity and readability, making it ideal for beginners.
Why Python?- Easy to learn and use.
- Extensive libraries and frameworks.
- Versatile: used in web development, data analysis, AI, scientific computing, etc.
- Large and supportive community.
---
🔹
3. Setting Up PythonInstalling Python:Windows:1. Download the Python installer from the [official Python website](
https://www.python.org/).
2. Run the installer and follow the instructions. Make sure to check the box that says "Add Python to PATH."
macOS:1. macOS comes with Python 2.x pre-installed. To install Python 3, use Homebrew:
/bin/bash -c "$(curl -fsSL
https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install python
Linux:1. Use your distribution's package manager:
sudo apt-get update
sudo apt-get install python3
Using Pydroid (for Android users):1. Download Pydroid 3 from the [Google Play Store](
https://play.google.com/store/apps/details?id=ru.iiec.pydroid3).
2. Open the app and you can start writing and running Python code directly on your phone.
Setting Up an IDE:IDLE:- Comes bundled with Python. Simple to use for beginners.
VS Code:1. Download and install from [Visual Studio Code website](
https://code.visualstudio.com/).
2. Install the Python extension for better support.
PyCharm:1. Download and install from the [JetBrains website](
https://www.jetbrains.com/pycharm/).
---
🔹
4. Basic Syntax and StructureWriting Your First Python Program:1. Open your IDE, text editor, or Pydroid app.
2. Type the following code:
print("Hello, World!")
3. Save the file with a .py extension (e.g., hello.py).
4. Run the script:
-
Command Line: Navigate to the file location and run python hello.py.
-
Pydroid: Tap the "Run" button in the app.
Understanding the Python Shell:- The Python shell is an interactive mode where you can execute Python code line by line.
- To open the Python shell, type python in your command line or terminal.
- In Pydroid, you can use the REPL (Read-Eval-Print Loop) feature for interactive coding.
Running a Python Script:- Write your Python code in a .py file.
- Run the file from the command line using python filename.py.
- In Pydroid, save your file and tap the "Run" button.
---
Practice:1. Install Python or Pydroid on your device.
2. Write and run your first Python program: print("Hello, World!").
---
https://t.me/pythonESH