Introduction to Python
✕Introduction

What is Python?
- High-level, Interpreted programming language
- Created by Guido van Rossum in 1991
- Open Source
- Has a lot of libraries and community support
- Supports Structural & OOP Programming
- Code are case sensitive
- Data Science, AI and ML
- Web Development
- Scripting & Q/A automation
- IOT and Robotics etc.
Uses
Sample Code
- Python file is saved with .py or .ipynb extension
print("Hello, World!")print(2)print(4 + 5 * 2)x = 5 y = x + 10 print(y)age = 16 if age >= 18: print("Eligible to vote") else: print("Not eligible to vote")
IDE
- Integrated Development Environment
- Writing, Editing and Running code
- Identifying errors (Debugging)
- Syntax highlighting
- Version control integration
- Visual Studio Code (VS Code)
- PyCharm
- Jupyter Notebook
- Google Colab
- Spyder
Software application used for
Some Popular Python IDEs:
Installation and Setup
- Download and install Python (Note: Check on Add to path during installation)
- Download and install VS-Code
- Go to Extension view (shortcut:
ctrl+shift+x) - Search and install Python extension from Microsoft
- Create a new file with .py extension
- Copy codes from previous slide
- Click play button on top right to run
- See if code works as expected
Install Python Extension in VS-Code
For running Python code
Google Colab
- Free cloud-based Jupyter notebook environment
- No setup required, runs in browser
- Great for data analysis, machine learning, and sharing code
- Code will be saved in Google Drive automatically
- Open Google Colab in browser
- Click + New Notebook on bottom left to create new file with meaningful name
- Add code cells using + Code button from top bar
- Write Python code in cells
- Click play or type Shift + Enter to run a cell and move to next
Coding in Colab:
