First Code
Programming begins with writing instructions that a computer can understand and execute. To work with data, we need to store it, process it, and retrieve it, which requires to write code using a programming language.
Python is a high-level, interpreted language designed to be easy to read and write. The interpreter translates Python code into bytecode and executes it, ultimately running machine-level instructions.
We use programming languages like Python because computers only understand binary (0s and 1s), programming languages provide a human-friendly way to write instructions that get translated into machine code.

How Python Code Runs
To execute Python code, you need two things:
- A text editor or IDE – where you write the code
- A compiler/interpreter – that converts your code into machine language (binary) so the computer can execute it. The interpreter reads it, converts it to binary internally, and displays the output on the console.
Running First Python Program (Online IDE)
Before installing Python on your computer, you can try writing and running Python code online.
Using OnlineGDB (Online Python Compiler)
Website: https://www.onlinegdb.com/
Steps:
-
Open the website
-
Select Python 3 as the programming language
-
A default template (comments + sample “Hello Python” code) appears
-
Click Run
-
The code will be:
- Compiled into binary
- Executed
- Output will appear in the console window

First Code
print("Hello Python")Output:
Hello Python
What’s Next?
In the next lecture, you will:
- Install Python
- Explore a proper IDE (Integrated Development Environment)
- Start writing Python programs on your computer
Written By: Muskan Garg
How is this guide?
Last updated on
