INTRODUCTION
What is python programming language?
Python is a high-level, interpreted, and object-oriented programming language known for
its simplicity and readability. Guido van Rossum was created by python language it was first released
at 1991. Python's design was code readability, using significant indentation to define code blocks, it
easier to understand and write.in simple words it has user friendly Syntex.
Features of Python
1. Easy to Read and Write / Ease of Use
Python has a simple and clear syntax (rules for writing code).
Because of this, it is easy to learn and understand, especially for beginners. Programmers can write
programs with less code compared to many other languages.
2. Interpreted Language
Python is an interpreted language, which means the code is executed line by line by the Python
interpreter. This makes it easier to test and find errors (debugging) because you can see problems
immediately when a line runs.
3. Dynamic Typing
In Python, you do not need to declare the type of a variable (such as integer, string, etc.) before
using it. Python automatically detects the type of data when the program runs.
This makes coding more flexible and faster.
Example:
x = 10 # integer
x = "Hello" # now it becomes a string
4. Extensive Libraries
Python has many built-in and external libraries that help programmers perform complex tasks
easily.
Examples:
NumPy – used for numerical and scientific calculations
Pandas – used for data analysis
TensorFlow – used for machine learning and artificial intelligence
Flask – used for building web applications
These libraries save time because you don’t have to write everything from scratch.
5. Cross-Platform
Python programs can run on different operating systems such as Windows, macOS, and Linux.
This means a program written in Python can usually work on multiple platforms without major
changes.
, PYTHON LIBRARY
A Python library is a collection of related modules (files containing code) that help
programmers perform different tasks. These modules contain ready-made functions and tools that
developers can use in their programs. Libraries make programming easier and faster because
programmers do not need to write all the code themselves. Instead, they can reuse the code that
already exists in the library.
Python libraries are very important in many areas such as:
Machine Learning – building intelligent systems and predictions
Data Science – analysing and working with large amounts of data
Data Visualization – creating charts, graphs, and visual reports
In simple terms, Python libraries save time and effort by providing ready-to-use tools for
programming.
TYPES OF PYTHON LIBRARY
There are two type of python library one is Built-in Python Standard Library and another one is
External Python Libraries
BUILT-IN PYTHON STANDARD LIBRARY
Python provides a collection of modules that come bundled with every Python installation, so
we do not need to install them separately. Many of these modules are implemented in C, which helps
improve performance. These modules provide useful functions for common programming tasks such
as mathematics, file handling, operating system interaction, and data processing.
Examples of Built-in Modules
math – Provides mathematical functions like square root, trigonometry, and logarithms.
os – Allows interaction with the operating system (files, directories, environment variables).
datetime – Used for working with dates and times.
random – Generates random numbers and performs random selections.
json – Used for encoding and decoding JSON data.
Example program for built in modules
1. Hi World Program
print ("Hi, World!")
Output: Hi World
2. Addition of Two Numbers
a=8
b=3
sum = a + b
print("Sum =", sum)
output: 11