Python Introduction, Variables, Operators
Assumed Knowledge:
Learning Outcomes:
- Install required software
- Create variables
- Perform basic arithmetic operations
Author: Gaurav Gupta
Installation
- Install Python (version
3.10.2
at the time of writing these notes). For windows, make sure you add Python to class path. - Install Visual Studio Code (or any other IDE of your preference). However, we will only troubleshoot VS Code issues.
- Inside Visual Studio Code, install the extension Python by Microsoft.
Write your first program
- Open Visual Studio Code
- Click on New
- Click on File
-
Type the following (without the line number and no leading spaces):
1
print("Hello World!")
- Save as
my_first_python_program.py
. - Click on the Play icon on the top-right side.
- You should see the output
Hello World!
in the terminal or console.
History of Python
Python is not named after the non-venomous snakes, but after the acclaimed British comedy show Monty Python.
Developed by Guido van Rossum, Python is an interpreted language, and the most widely-used programming language according to TIOBE, as of 18th September, 2024.