Report 5
Report 5
Submitted To Submitted By
Dr. Subhash Chandra Jyoti
I have not submitted the matter presented in this report anywhere for the award of any other Degree.
Jyoti
20ERWCS025
Counter Signed by
Assistant Professor
ii
Certificate
This is to certify that the Industrial Training/Seminar report entitled “Python Programming” done by Ms
JYOTI Enrollment no. 20ERWCS025 is an authentic work carried out by her at Rajasthan College of
Engineering for Women under my guidance. The matter embodied in this Industrial Training work has not been
submitted earlier for the award of any degree or diploma to the best of my knowledge and belief.
Assistant Professor
iii
TABLE OF CONTENTS
Certificate i
Declaration ii
Acknowledgement iii
Abstract iv
List of Figures v-vi
List of Tables vii
Table of Content viii- x
Chapter 1 Introduction 1
1.1. Introduction of python programming 1
1.2. History 1
1.3. Key Concepts 2
1.4. Popularity 3
1.5. Importance 4
1.6. Object Oriented Programming 6
Chapter 2 Python setup 7
2.1. Commandline Basics 7
2.2. Installing python 8
2.3. Running python code 9
Chapter 3 Concept of Python 10
3.1. Variables 11
3.2. Datatypes 12
3.3. List 13
3.4. Tuple 14
3.5. Difference between list and tuples 15
3.6. Dictionaries 16
3.7. Operators in python 17
3.8. Control structure 18
3.9. Functions 19
Chapter 4 Working with Libraries 20
4.1. Basic libraries 21
iv
4.2. Working of libraries 22
4.3. Uses of libraries 23
4.2. Web scrapping in python 24
4.3. Working with images in python 25
4.4. Working with pdf files in python 26
4.5. Graphical user interface 29
4.6. Scope of python 30
4.7. Application of python 31
Chapter 5 Conclusion and Future Work 32
5.1. Summary and Contributions
5.2. Future Scope
Reference 41
v
LIST OF TABLES
vi
LIST OF FIGURES
viii
Acknowledgement
I would like to thank the Assistant Professor, Computer Science and Engineering Mr. Vinod Todwal for his
valuable guidance. I appreciate his presence for giving all discussions, suggestions and the time for me
whenever I needed him. He consciously or unconsciously leveraged his key and creative insights wherever
applicable in the project. Amidst of him busy schedule, he made himself available for any query related to
project almost every time. I sincerely appreciate his contributions in terms of time and ideas.
I would also like to give my special thanks to Director Dr. Shraddha Arya and HOD Dr. Subhash Chandra for
providing the opportunity and support to me for this work.
I would like to give my sincere thanks to, ……………… Assistant Professor, Department of Computer Science
and Engineering for guidance and support.
I would also offer my deepest gratitude towards the Management of Rajasthan College of Engineering for
Women, Dr. Jitendra Singh Fauzdar and Mrs. Beena Singh, for providing me a spirit to put my every effort
and hard work for the completion of the work.
I also want to thank my all faculty and staff members, friends and family for their encouragement and support.
In particular, I am grateful to my parents for their love and for instilling in me a deep sense of academic pride.
Lastly, I offer my regards and blessings to all of those who supported me in any respect during the completion
of the work.
Jyoti
20ERWCS025
ix
ABSTRACT
This report provides an overview of the Python programming language and its applications. It covers the basics
of Python programming, including data types, control structures, functions, and modules. The report also
discusses advanced topics such as object-oriented programming, file handling, and exception handling. Python
is a high-level, versatile, and widely used programming language known for its simplicity and readability.
Created by Guido van Rossum in the late 1980s, Python has gained immense popularity in various domains,
including web development, data analysis, scientific computing, artificial intelligence, and more. The Python
report delves into the language's key features, applications, and significance in the realm of programming. It
explores Python's versatility, simplicity, and readability, making it an ideal choice for diverse domains such as
web development, data science, and artificial intelligence. The report highlights Python's extensive standard
library and vibrant community support, contributing to its widespread adoption. It also discusses the language's
continuous evolution, with regular updates and enhancements ensuring it remains at the forefront of innovation.
Additionally, the document discusses Python's role in emerging technologies and its continuous evolution,
positioning it as a powerful and adaptable language for both beginners and experienced developers alike.
Python is an object-oriented language that supports multiple programming paradigms such as procedural,
functional, and imperative programming. The report also discusses advanced topics such as object-oriented
programming, file handling, and exception handling. The report also covers Python libraries and frameworks
such as NumPy, Pandas, and Tkinter. NumPy is a fundamental library for scientific computing in Python.
NumPy is essential for data manipulation and numerical computations. NumPy is a powerful library for
numerical computing that provides support for large, multi-dimensional arrays and matrices, along with
mathematical functions to operate on these arrays. Pandas is a popular library for data manipulation and
analysis. It offers data structures like Data Frames and Series, which are used for cleaning, aggregating, and
analyzing data. It provides data structures for efficiently handling large datasets and tools for data cleaning,
exploration, and analysis. Whether for beginners seeking an accessible entry point or seasoned developers
tackling complex projects, Python stands out as a versatile and powerful language with enduring relevance.
1
Chapter-1
INTRODUCTION
1.2 HISTORY
Python's history dates back to the late 1980s when Guido van Rossum, a Dutch programmer, began working on
a project called the "ABC" language at Centrum Wiskunde & Informatica (CWI) in the Netherlands. The goal
was to create a language that was both easy to use and capable of handling system tasks. However, ABC was
not widely adopted. In December 1989, van Rossum decided to start a new project, influenced by his
experience with ABC. This new language, which he called Python, aimed to combine a clear and readable
syntax with powerful features. The name "Python" was inspired by Monty Python's Flying Circus, a British
comedy group. Python's development continued, and its first public release, Python 0.9.0, came in February
1991. This release included many features that are still part of Python today, such as exception handling,
functions, and modules. The design philosophy of Python, often summarized as "Readability counts" and
"There should be one—and preferably only one— obvious way to do it," contributed to its user-friendly nature.
Python 2 was the primary 2 version for many years, with the final release, Python 2.7, in July 2010. However,
the development community decided to transition to Python 3, introducing some non-backward-compatible
changes to improve the language . Python 3.0, also known as Python 3000 or Py3k, was released in December
2008. While the adoption of Python 3 took time due to compatibility concerns with existing Python 2
codebases, it eventually gained widespread acceptance as the standard. Python's popularity soared in the 2010s,
driven by its simplicity, versatility, and a thriving ecosystem of libraries and frameworks. The language found
extensive use in web development (Django, Flask), data science (NumPy, pandas), machine learning and
artificial intelligence (TensorFlow, Py Torch), automation, and more.
1.4. POPULARITY
Python programming has enjoyed widespread popularity due to several key factors. It's clear and readable
syntax makes it an accessible language for both beginners and experienced developers, fostering a welcoming
learning
environment. Python's versatility is a significant contributor to its ubiquity, as it finds application across diverse
3
domains, including web development, data science, machine learning, artificial intelligence, scientific
computing, and automation. The language's active and robust community support, evident in the abundance of
libraries, frameworks, and resources available, further propels its popularity. Python's dominance in data
science and machine learning, with widely used libraries such as NumPy, pandas, TensorFlow, and PyTorch,
has solidified its position as a go-to language in these rapidly evolving fields. Additionally, Python's utility in
web development, exemplified by frameworks like Django and Flask, underscores its adaptability. The
language's prevalence in scripting and automation, its use in corporate 4 settings, and its appeal to startups and
innovative projects contribute to sustained demand for Python developers in the job market. The collaborative
spirit fostered by community events and conferences, such as PyCon, further strengthens Python's global
presence. Overall, Python's ease of use, versatility, and strong community support have propelled it to the
forefront of programming languages, making it a top choice for a diverse range of applications.
1.5. IMPORTANCE
Python programming holds immense importance in the field of computer science and various industries. Its
versatility and readability contribute to its widespread adoption, and its significance can be highlighted in
several aspects:
• Ease of Learning and Readability: Python's syntax is clear, concise, and resembles the English language,
making it easy for beginners to learn and understand. Its readability facilitates collaboration among developers,
leading to more maintainable code.
• Versatility and Cross-Industry Applicability: Python is a versatile language with applications across diverse
domains. It is extensively used in web development (Django, Flask), data science (NumPy, pandas), machine
learning (TensorFlow, PyTorch), scientific computing, automation, scripting, and more. Its adaptability allows
developers to switch between different projects and domains seamlessly.
• Data Science and Machine Learning: Python is the language of choice for data science and machine learning
projects. Libraries like NumPy, pandas, and scikit-learn simplify data manipulation and analysis, while
TensorFlow and PyTorch provide powerful tools for building and training machine learning models.
• Web Development: Python frameworks such as Django and Flask have streamlined web development. They
emphasize rapid development, code reusability, and follow the Don't Repeat Yourself (DRY) principle, making
Python an ideal choice for building scalable and maintainable web applications.
• Libraries and Frameworks: Python's rich standard library and a plethora of thirdparty libraries and frameworks
accelerate development. Developers can leverage pre-built modules to enhance functionality, saving time and
effort in project implementation.
• Corporate Adoption: Many large corporations and organizations use Python for various purposes, including
software development, data analysis, and automation. Its readability and maintainability are advantageous for
building and maintaining large-scale projects.
• Startups and Innovation: Python's quick development cycle and the ability to prototype ideas rapidly make it
popular among startups and innovative projects. Its flexibility allows developers to experiment and iterate
4
efficiently.
• Job Market Demand: The demand for Python developers has surged, with many job listings specifying
Python as a required skill. Learning Python enhances one's employability and opens doors to a wide range of
career opportunities.
• Educational Use: Python is widely used in educational settings and is often the language of choice for
introductory programming courses. Its simplicity helps students focus on programming concepts rather than
intricate syntax.
• Cross-Platform Compatibility: Python is compatible with major operating systems, including Windows,
macOS, and Linux. This cross-platform support ensures that Python applications can run seamlessly across
different environments.
Inheritance facilitates the creation of new classes based on existing ones, enabling code reuse and the
establishment of a hierarchy of classes. This hierarchy supports the "is-a" relationship, where a derived class
inherits attributes and methods from its base class.
Polymorphism, a key OOP concept, allows objects to be treated as instances of their base class while still
exhibiting their specific behaviours..In Python, creating a class is straightforward, and it allows for the
instantiation of objects with attributes and methods.
The __init__ method serves as a constructor, defining initial attributes when an object is created. Additionally,
Python supports multiple inheritance, enabling a class to inherit from multiple parent classes. Object means a
real-world entity such as a pen, chair, table, computer, watch, etc.
Python supports multiple inheritance, enabling a class to inherit from multiple parent classes. Object means a
real-world entity such as a pen, chair, table, computer, watch, etc.
Object-Oriented Programming is a methodology or paradigm to design a program using classes and objects.
It simplifies software development and maintenance by providing some concepts. An Object can be defined as
an instance of a class.
5
An object contains an address and takes up some space in memory. Objects can communicate without knowing
the details of each other's data or code. The only necessary thing is the type of message accepted and the type of
response returned by the objects.
OOPs provides the ability to simulate real-world event much more effectively. We can provide the solution of
real word problem if we are using the Object-Oriented Programming language.
6
Chapter-2
PYTHON SETUP
7
Windows:
Download Python:
• Visit the official Python website at python.org.
• Click on the "Downloads" tab.
• Choose the latest version of Python for Windows (usually displayed prominently).
• Click on the download link, and an installer file (.exe) will be downloaded.
Run the Installer:
• Locate the downloaded installer file.
• Double-click on the file to run the installer.
• Check the box that says "Add Python to PATH" during installation. This makes it easier to run Python
from the command line.
Installation Settings:
• Click "Install Now" to use the default settings.
Complete the Installation:
• Wait for the installation process to finish.
• Once complete, you should see a screen indicating a successful installation.
Verifying the Installation (All Platforms):
• Open Command Prompt/Terminal: Open the command prompt on Windows or the terminal on
macOS/Linux.
• Check Python Version: Run the following command to check the installed Python version:
Chapter-3
CONCEPT OF PYTHON
3.1. VARIABLES
In Python, variables are fundamental components used to store and manage data within a program. Unlike some
statically-typed languages, Python employs dynamic typing, allowing developers to create variables without
specifying their types explicitly. When declaring a variable, you assign it a value, and Python determines its
type based on the assigned value. For instance, an integer, floating-point number, string, boolean, or even a
complex number can be stored in a variable. This flexibility facilitates concise and expressive code.
Variable names in Python follow specific rules: they can consist of letters, numbers, and underscores but cannot
start with a number. Additionally, Python is case-sensitive, treating uppercase and lowercase letters as distinct.
While choosing variable names, it's essential to avoid using reserved words that have predefined meanings in
the language. Variables in Python can be reassigned with new values, allowing for dynamic updates to the data
they represent. This flexibility is particularly useful in scenarios where the value of a variable may change
during program execution.
How Do I Assign a Value to a Variable?
Assigning a value to a variable in Python is an easy process.
You simply use the equal sign = as an assignment operator, followed by the value you want to assign to the
variable. Here's an example:
In this example, we've created two variables: country and year_founded. We've assigned the string value
"United States" to the country variable and integer value 1776 to the year_founded variable.
1. Variables in Python are case-sensitive. In other words, watch your casing when creating variables,
because Year_Founded will be a different variable than year_founded even though they include the
same letters
2. Variable names that use multiple words in Python should be separated with an underscore _. For
example, a variable named "site name" should be written as "site_name". This convention is called
snake case (very fitting for the "Python" language).
How Should I Name My Python Variables?
There are some rules to follow when naming Python variables.
Some of these are hard rules that must be followed, otherwise your program will not work, while others are
known as conventions. This means, they are more like suggestions.
Python variables can hold various data types, including integers, floats, strings, booleans, tuples and lists:
answer = 42
weight = 34.592
is_authenticated = True
point = (3, 4)
3.2. DATATYPES
In Python, data types are fundamental classifications that define the nature of variables and values within a
program. Python is dynamically typed, meaning that the interpreter infers the data type of a variable based on
the value it holds. Several built-in data types are commonly used in Python:
• Integers (int): Integers represent whole numbers without a fractional component. They can be positive or
negative.
Ex: age=25
10
• Floats (float): Floats represent numbers with a decimal point or in scientific notation, allowing for the
representation of both integers and fractions.
Ex: height = 1.75
• Strings (str): Strings are sequences of characters enclosed in single (' ') or double (" ") quotes. They are used to
represent text.
Ex: name = "John"
• Booleans (bool): Booleans represent truth values and can be either True or False. They are often used in
conditional statements and expressions.
Ex: is_student = False
• Lists (list): Lists are ordered and mutable collections that can contain elements of different data types. They
are defined using square brackets.
EX: numbers = [1, 2, 3, 4, 5]
• Tuples (tuple): Tuples are similar to lists but are immutable, meaning their elements cannot be modified once
assigned. They are defined using parentheses.
Ex: coordinates = (3, 5)
• Dictionaries (dict): Dictionaries are unordered collections of key-value pairs. They are defined using curly
braces and colons.
Ex: person = {"name": "Alice", "age": 30, "is_student": True}
• Sets (set): Sets are unordered collections of unique elements. They are defined using curly braces.
Ex: unique_numbers = {1, 2, 3, 4, 5}
• Nontype (None): None is a special constant in Python representing the absence of a value or a null value.
3.3 LIST
In Python, a list is a dynamic and mutable data structure that serves as a container for holding a collection of
items. It is defined by enclosing elements within square brackets [] and separating them with commas. Lists are
versatile and widely used in Python due to their ability to store heterogeneous data types and support various
operations. One of the key features of lists is their indexing, allowing elements to be accessed by their position
in the list. Indices start at 0 for the first element, and negative indices represent positions from the end of the
list. This enables efficient retrieval and manipulation of individual elements. Lists are mutable, meaning that
their elements can be modified after creation. This mutability allows for actions like changing specific
elements, appending new elements, or removing existing ones. Additionally, lists support slicing, enabling the
extraction of sublists based on specified indices. Creating and modifying lists are common tasks in Python
programming. Elements can be added using the append() method or 12 removed using methods like remove()
and pop(). Lists also support various operations such as concatenation and repetition, providing flexibility in
data manipulation. List comprehensions are a concise and powerful feature in Python for creating lists. They
offer a syntactically compact way to generate lists based on specified conditions or transformations. Nested
lists, where a list contains other lists, allow for the creation of multidimensional structures. This is particularly
useful for representing
11
matrices or tables within a single list.
12
13
3.4 TUPLE
In Python, a tuple is a versatile and immutable data structure used to store an ordered collection of elements.
Tuples are defined by enclosing elements within parentheses () and separating them with commas. The key
characteristics of tuples are their immutability, meaning once created, their elements cannot be modified, and
their ordered nature, which preserves the sequence of elements. Creating a tuple is straightforward, and
elements within it can be of different data types, allowing for flexibility in representing diverse information.
16
• Arithmetic Operators: Arithmetic operators are used for mathematical operations, such as addition,
subtraction, multiplication, division, and modulus.
• Comparison Operators: Comparison operators are used to compare values and return Boolean results.
17
• Identity Operators: Identity operators are used to compare the memory locations of two objects.
In Python, control structures are integral components that enable the logical flow and execution of code. These
structures include conditional statements, loops, and exception handling, providing mechanisms for decision
making, iteration, and error management.
Conditional Statements: Conditional statements, like if, elif (else if), and else, allow programmers to execute
specific blocks of code based on certain conditions. This enables the creation of dynamic and responsive
programs that respond to varying inputs or states.
18
Loops: Loops, such as for and while, facilitate the repetition of code. for loops iterate over sequences or
iterable objects, executing a block of code for each element, while while loops continue execution as long as a
specified condition holds true. These structures empower developers to perform repetitive tasks efficiently.
Exception Handling: Exception handling, implemented with try, except, else, and finally blocks, provides a
systematic approach to managing errors in a program. It allows 19 developers to anticipate and gracefully
handle unexpected situations, ensuring the robustness and reliability of their code.
These control structures collectively contribute to the readability, flexibility, and functionality of Python
programs. They empower developers to create logical and organized code that responds dynamically to
different scenarios, making Python a versatile and expressive programming language. Understanding and
skilfully employing these control structures are essential aspects of proficient Python programming.
For Loops: for loops are particularly useful for iterating over sequences, such as lists, tuples, or strings. The
loop iterates over each element in the sequence, executing a specified block of code for each iteration.
While Loops: while loops continue to execute a block of code as long as a specified condition remains true.
This type of loop is often used when the number of iterations is not known in advance.
3.9 FUNCTIONS
In Python, functions are fundamental units of code that encapsulate a specific task or set of instructions,
promoting modularity, reusability, and maintainability in programming. Functions are defined using the def
keyword, followed by the function name and a set of parameters enclosed in parentheses. The function body
19
contains the code to be executed when the function is called, and it is indented to signify its scope.
An exception is an error which happens at the time of execution of a program. However, while running a
program, Python generates an exception that should be handled to avoid our program to crash. In Python
language, exceptions trigger automatically on errors.
The exception indicates that, although the event can occur, this type of event happens infrequently. When the
method is not able to handle the exception, it is thrown to its caller function. Eventually, when an exception is
thrown out of the main function, the program is terminated abruptly.
During the execution of the try statement, if no exceptions occurred then, the interpreter ignores the exception
handlers for that specific try statement.
In case, if any exception occurs in a try suite, the try suite expires and program control transfers to the matching
except handler following the try suite.
21
Finally, clause is optional. It is intended to define clean-up actions which should be that executed in all
conditions.
22
Python Errors
Figure 3.29 Python Errors
23
Chapter-4
WORKING WITH LIBRARIES
4.1 PYTHON LIBRARIES
In Python, libraries are collections of pre-written code modules that provide a range of functionalities, allowing
developers to extend the capabilities of their programs without having to build everything from scratch. These
libraries cover diverse domains, from mathematics and data manipulation to web development and machine
learning, offering a wealth of tools and resources. Some prominent Python libraries include:
• NumPy: NumPy is a powerful library for numerical computing that provides support for large,
multidimensional arrays and matrices, along with mathematical functions to operate on these arrays. It is widely
used in scientific computing, data analysis, and machine learning.
NumPy in Python is a library that is used to work with arrays and was created in 2005 by Travis Oliphant.
NumPy library in Python has functions for working in domain of Fourier transform, linear algebra, and
matrices. Python NumPy is an open-source project that can be used freely. NumPy stands for Numerical
Python.
Installing NumPy:
Installing the NumPy library is a straightforward process. You can use pip to install the library. Go to the
command line and type the following:
NumPy is a library for the Python programming language, and it’s specifically designed to help you work with
data.
With NumPy, you can easily create arrays, which is a data structure that allows you to store multiple values in a
single variable.
In particular, NumPy arrays provide an efficient way of storing and manipulating data.NumPy also includes a
24
number of functions that make it easy to perform mathematical operations on arrays. This can be really useful
for scientific or engineering applications. And if you’re working with data from a Python script, using NumPy
can make your life a lot easier.
• pandas: pandas is a data manipulation library that provides data structures like DataFrame for efficient data
analysis. It is particularly valuable for handling and cleaning structured data, making it a go-to tool in data
science and analytics.
Pandas is a powerful and versatile library that simplifies tasks of data manipulation in Python . Pandas is built
on top of the NumPy library and is particularly well-suited for working with tabular data, such as spreadsheets
or SQL tables. Its versatility and ease of use make it an essential tool for data analysts, scientists, and engineers
working with structured data in Python.
What can you do using Pandas?
Data set cleaning, merging, and joining.
Easy handling of missing data (represented as NaN) in floating point as well as non-floating point data.
Columns can be inserted and deleted from DataFrame and higher dimensional objects.
Powerful group by functionality for performing split-apply-combine operations on data sets.
Data Visulaization
Installing Pandas
The first step of working in pandas is to ensure whether it is installed in the system or not. If not then we need
to install it in our system using the pip command. Type the cmd command in the search box and locate the
folder using the cd command where python-pip file has been installed. After locating it, type the command:
• Tkinter: Tkinter is Python's standard GUI library, which comes with Python's standard library. It provides a
simple and easy way to create desktop applications with graphical interfaces. Tkinter is well-suited for smaller
projects and applications with basic GUI requirements.
It is a standard Python interface to the Tk GUI toolkit shipped with Python. Python tkinter is the fastest and
easiest way to create GUI applications. Creating a GUI using tkinter is an easy task.
To create a tkinter Python app:
Importing the module – tkinter
Create the main window (container)
Add any number of widgets to the main window
Apply the event Trigger on the widgets.
The name of the module in Python 2.x is ‘Tkinter’ and in Python 3.x it is ‘tkinter’.
1. pack() method: It organizes the widgets in blocks before placing in the parent widget.
2. grid() method: It organizes the widgets in grid (table-like structure) before placing in the parent widget.
3. place() method: It organizes the widgets by placing them on specific positions directed by the
programmer.
• Flask and Django: Flask and Django are web development frameworks that simplify the process of building
web applications in Python. Flask is a lightweight framework, while Django provides a more comprehensive
solution, including an ORM (Object-Relational Mapping) system and an admin interface.
Flask: Initially launched in 2010 by Armin Ronacher, Flask is known as a micro-framework as it has little or
no dependencies on external libraries. Using it, developers have the flexibility of choosing design patterns,
tools, and databases. Thus, flexibility is the main feature of this python framework.
Since the web development industry is now leaning more towards micro-services and server-less platforms,
Flask’s popularity is continuously rising. It is widely used for building scalable web applications effortlessly.
All thanks to its unique features.
Features of Flask
Built-in development server and a fast debugger
High scalability as it is a component-based framework
It uses Jinja2 templates and is WSGI 1.0 compliant.
RESTful request dispatching
ORM-agnostic and highly flexible
HTTP request handling functionality
Provides support for unit testing
Easy to deploy in production
Django: Launched in 2005, Django is a full-stack framework designed with the primary goal of making the
27
development of complex database-driven websites easy. It facilitates secure and faster development by freeing
developers from performing repetitive web development tasks. With many excellent features, it enables
developers to create robust and high-performing applications.
Another USP of the Django framework is that it is an easy-to-scale and secure web framework, so it is perfect
for developing enterprise-level applications. Supporting multiple formats (like XML, HTML, JSON, etc.),
Django lets developers focus on developing the web apps’ business logic and eliminates the need to create apps
from scratch.
Features of Django
A batteries-included framework
Allows rapid development
Easy to scale and extend
Highly secure and versatile
Supports multiple databases
Provides support for many front-end tools
Large and helpful Community
• TensorFlow and PyTorch: These are libraries specifically designed for machine learning and deep learning.
TensorFlow is developed by Google, and PyTorch is maintained by Facebook. Both are widely used for
building and training neural networks.
TensorFlow: Just like PyTorch, it is also an open-source library used in machine learning. It was developed by
Google and was released in 2015. Its name itself expresses how you can perform and organize tasks on data.
Production and research are the main uses of Tensorflow. Neural networks mostly use Tensorflow to develop
machine learning applications.
PyTorch: It is an open-source library used in machine learning. It was developed by Facebook and was released
to the public for the first time in 2016. It is imperative which means it runs immediately and the user can check
if it is working or not before writing the full code. We can write a part of code and check it in real time, it is
built-in python based implementation to provide compatibility as a deep learning platform. It rapidly gained
users because of its user-friendly interface.
• Beautiful Soup: Beautiful Soup is a library for web scraping purposes. It provides tools for pulling data out
of HTML and XML files, making it useful for extracting information from websites.
Beautiful Soup is a Python library for getting data out of HTML, XML, and other markup languages. Say
you’ve found some webpages that display data relevant to your research, such as date or address information,
but that do not provide any way of downloading the data directly. Beautiful Soup helps you pull particular
content from a webpage, remove the HTML markup, and save the information. It is a tool for web scraping that
helps you clean up and parse the documents you have pulled down from the web.
28
Install Beautiful Soup:
Step 1: Installing the required third-party libraries
Easiest way to install external libraries in python is to use pip. pip is a package management system used to
install and manage software packages written in Python. All you need to do is:
32
33
4.7. GRAPHICAL USER INTERFACE
A graphical user interface (GUI) is a digital interface in which a user interacts with graphical components such
as icons, buttons, and menus. Python has several libraries that make it easy to create graphical user interfaces
(GUIs). One of the most popular libraries for creating GUIs in Python is Tkinter . Tkinter is a built-in Python
library that provides a simple way to create GUIs. Tkinter provides several widgets, such as buttons, labels, and
text boxes, that you can use to create your GUI. You can also use Tkinter to create menus, dialog boxes, and
other GUI elements. Another popular library for creating GUIs in Python is PyQt . PyQt is a set of Python
bindings for the Qt application framework and runs on all platforms supported by Qt, including Windows, OS
X, Linux, iOS, and Android. PyQt provides a wide range of widgets, including buttons, labels, and text boxes,
that you can use to create your GUI. PyQt also provides support for creating menus, toolbars, and other GUI
elements. Another popular library for creating GUIs in Python is wxPython . wxPython is a set of Python
bindings for the wxWidgets C++ toolkit. wxPython provides a wide range of widgets, including buttons, labels,
and 28 text boxes, that you can use to create your GUI. wxPython also provides support for creating menus,
toolbars, and other GUI elements. Finally, another popular library for creating GUIs in Python is PySimpleGUI.
PySimpleGUI is a new Python GUI library that has been gaining a lot of interest recently. PySimpleGUI
provides a simple way to create GUIs in Python. PySimpleGUI provides several widgets, including buttons,
labels, and text boxes, that you can use to create your GUI. PySimpleGUI also provides support for creating
menus, toolbars, and other GUI elements.
CHAPTER 5
CONCLUSION AND FUTURE WORK
1. Web Development
Famously known as the go-to programming language for web development, Python has an important role to
play in it. Python comes with multiple web development frameworks like Pyramid, Django, and Flask. These
frameworks are packed with standard libraries that allow easy protocol integration and lead to a reduction in
development time.
2. Data Science
We all know that data science is one of the most in-demand skills in the market. Knowledge of data science is a
sought-after skill in IT, manufacturing, or eCommerce. This is where Python steps in. Its multiple libraries,
such as Pandas, TensorFlow, NumPy, etc help in extracting valuable information from the data. Libraries
like Matplotlib and Seaborn further allow a data science professional to focus on data visualization
through graphs and charts. It won’t be an exaggeration to say that Python is the first thing that any data science
professional needs to know.
37
REFERENCES
https://www.geeksforgeeks.org/python-lists/
https://www.w3schools.com/python/python_intro.asp
https://www.geeksforgeeks.org/libraries-in-python/
https://www.codingninjas.com/studio/library/python-libraries-and-their-features
https://medium.com/@techyfygeeks/future-scope-and-trends-in-python-programming-in-2023-
fa8a38a50f3e
41