Programming Language
• Programming Language is the way of communication between Humans and Ma-
chines
Python
• Python is a, High level , general purpose, Dynamically typed Programming language
Levels of programming languages
1 - High level -----> More understandable by Humans ----> ex:- Python, Scala, Java
2 - Low level -----> More understandable by Machines-----> ex:- Assembly language
3 - Middle level language -----> It is understandable by humans as well as Machine
High level
general purpose (Multipurpose)
Python
DS
ML
DL
LLM
web apps
websites
Typed Programming languages
1 - Dynamically typed
2 - Statically typed
embedded C
10 + 50
60
NC ,
CNC
[IMAGE: image.png]
print("Hello")
Hello
java (Statically typed)
int a
a = 50
python (Dynamically typed)
a = 50
int a
a = 50
Cell In[11], line 1
int a
^
1
SyntaxError: invalid syntax
a = "X"
b = 30.333333
c= 10
a
'X'
b
30.333333
c
10
Interpretted Language or Compiled Language
a = 10
b = 20
# c = 30
d = 40
Is Python Interpretted language or Compiled language ?
Python is both interpretted as well a Compiled Language
a
10
b
20
c
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
Cell In[6], line 1
----> 1 c
NameError: name 'c' is not defined
d
40
a = 10
b = 20
c = 30
d = 40
print(a)
print(d)
print(c)
print(b)
10
40
30
20
2
Why Python ?
- Easy to learn or understand
- Open Source
- Vast Libraries ( numpy , Pandas , Scikit lear Scipy , Django , flask Streamlit....)
- OOPs
- Multi purpose
- Community Support
- can connect to DBs
- Testing
- Cross Platform compatability Mutiple OS (Window , Mac IOS , Linux)
a = 10
var = 60
extensions of a python file
.py ----> anywhere
# Executing a python file
1 - Normal execution in Jupyter
2 - Python Interpretor using terminal
3 - .py file using the terminal
a = 10
b = 20
c = a+b
print(c)
30
pwd
'C:\\Users\\Lenovo\\Desktop\\7 April 2025'
import sys
sys.path[0]
'C:\\Users\\Lenovo\\Desktop\\7 April 2025'