Sitemap
PratikMurlidharYadav

PratikMurlidharYadav

Python-Programming-Day1

Lets learn basic of python

2 min readJun 13, 2023

What is Python?

Python is a simple, general purpose, high level, and object-oriented programming language. Python is an interpreted scripting language also. Guido Van Rossum is known as the founder of Python programming.· It was created in 1991 and further developed by the Python Software Foundation.

Press enter or click to view image in full size
features of python

How to write basic program in python.

#lets write python basic program
print("Hey I have written My first python program")
#output:

Hey I have written My first python program

In this program, the print() function is used to output the text "Hey I have written My first python program" to the console. When you run this code, you should see the output "Hey I have written My first python program" displayed on the console or terminal.

Get PratikMurlidharYadav’s stories in your inbox

Join Medium for free to get updates from this writer.

Save the code in a file with a .py extension (e.g., first_program.py). Then, you can run the program by opening a terminal or command prompt, navigating to the directory where the file is saved, and executing the following command:

py first_program.py

OR

python3 first_program.py

How the script get executed?

script execution

The Python interpreter is a program that executes Python code. It starts by tokenizing and parsing the code to create an Abstract Syntax Tree (AST). The AST is then compiled into bytecode, a lower-level representation of the code. The Python Virtual Machine (PVM) interprets the bytecode, executing the instructions one by one. The interpreter handles dynamic typing, memory management, and error handling. It associates objects with variables, manages memory allocation, and raises exceptions when necessary. The interpreter enables the interactive and dynamic nature of Python, making it a powerful and user-friendly programming language.

--

--