You are on page 1of 43

A REPORT ON

“ PYTHON WITH MACHINE LEARNING “

DIPLOMA IN COMPUTER TECHNOLOGY


AFFIATED TO MSBTE

Submitted By

Pratik Thakare
Under the Guidance of
S. K. Kharkate Mam

GOVERNMENT POLYTECHNIC BRAMHAPURI


DEPARTMENT OF COMPUTER TECHNOLOGY
2022-23

1
Certificate of Completion of Industrial Training

Maharashtra State Board of Technical Education

Certificate of Completion
Of Industrial training

This is certify that Mr./Mrs. Pratk Thakare with Enrollment


No. 2001210405 has successfully completed Industrial Training
(22049) in iBase Technologies from 04/07/2022 to 14/08/2022 for
partial fulfillment towards completion of Diploma in Computer
Technology from Government Polytechnic Bramhapuri Institute
code 0121.

Prof. S. K. Kharkate Dr. D. N. Shingade


Head Of Department Principal

2
ABSTRACT

Industrial training is one of the requirements to impart technical


education at diploma level in computer engineering as per MSBTE. As
such, the students are required to write and submit reports at the end of
their training.

This report includes the engineering experiences, professional based


practices and both TECHNICAL and NON-TECHNICAL knowledge
and skilled development gained by me during industrial training at
iBase Technologies Pvt. Lmt., Nagpur for 6 weeks from 04 July 2022
to 14 August 2022.

This industrial training consists of 10 chapters which altogether explain


the topics, points to be covered during training Chapter 1 and 2 explains
the background study of industry, its organizational structure,
responsibilities of different posts, its location etc. Chapter 3 explains
about the major equipment's/machines in industry with their function
specification and cost along with their maintenance. Chapter 4 consist
of material handling and safety procedures. Chapter 5 consists about
practical activities undertaken at workshop, common faults and their
remedies with controlling procedure. Chapter 6 explains about special
experiences encountered during training, recommendations and
conclusion. And chapter 7 consists of the references.

3
ACKNOWLEDGEMENT
I would like to express my gratitude to one and all who contributed me to
success in the industrial training program who helped me in various ways
technical, management and all sort of guidance given to improve my professional
and technical knowledge.

First, I would like to thank Mrs. Rohini Toal of iBase Technologies who
allowed us for training experience.

I must give my special thanks to the Head of Department of computer


engineering, respected Prof. S. K. Kharkate for her invaluable advice and
constant encouragement to complete this Industrial report in a successful manner
thanks to other academic staff members for their great efforts for monitoring our
training experience throughout the training period in order to ensure that we gain
maximum knowledge out of it.

I would like to express my deep sense of gratitude to our esteemed Principal


Dr. D. N. Shingade for her encouragement.

My special thanks to all the supervisors and developers of iBase


Technologies who helped me by spending their valuable time and teaching me to
resolved problems which I encountered while I was developing. These technical
advices not only helped me in resolving my problems but also improved my
technical experience.

At last but not the least I would like to thank everyone who has made my
training experience a pleasant and enjoyable one and helping me to overcome the
challenges I faced during training.
Roll No. Name of Student Enrollment No.
24 Pratik Ravindra Thakare 2001210405

Group Project Name : Design a text to speech program using python

4
CONTENT

Chapter Title Page


No. No.
1 Introduction to Industry 6
2 Types of major equipment /instruments 9
/machines used in industry
3 Manufacturing Processes along with 13
production planning and control methods
4 Testing of raw materials ,components and 16
finished products
5 Major Material handling products 18
6 Safety procedures followed and safety gear 19
used
7 Particulars of Practical Experiences in 22
industry
8 Short report of the Project 35

5
Chapter 1 : Introduction of Industry

1.1 HISTORY OF IBASE TECHNOLOGIES


Ibase Electrosoft LIP is a Limited Liability Partnership firm incorporated on
24 March 2015. It is registered at Registrar of Companies, Mumbai. Its total
obligation of contribution is Rs. 100,000.

Designated Partners of Ibase Electrosoft Llp are Nakul Wamanrao Deshmukh


and Mangesh Dinkarrao Bharati.

Ibase Electrosoft Llp's last financial year end date for which Statement of
Accounts and Solvency were filed is N/A and as per records from Ministry of
Corporate Affairs (MCA), date of last financial year end date for which Annual
Return were filed is N/A.

Ibase Electrosoft Llp's LLP Identification Number is (LLPIN)AAD-6062. Its


Email address is office.kalotilathiya@gmail.com and its registered address is
RAJAPETH-AMBADEVI ROAD NEAR OSWAL BHAVAN, MUDHOLKAR
PETH AMRAVATI Amravati MH 444601

1.2 SHORT INFORMATION ABOUT INDUSTRY


iBase Electrosoft LLP is stands on the base of intelligent of software
professionals. We combine research activity with practical applications in
programming, web development & integration, multimedia development,
custom IT system design, testing and consulting. Through this tight integration
ofbasic and applied activities, we managed to be at the forefront of the IT
process.We always think for client to provide efficient and in time solution.
Every solution provided by us is unique and innovative. Our approach has been
alwayscustomer and market communication centric. We create solutions
keeping your target consumer and audience in mind Our out of box thinking
generate an efficient product. Our competence and experience ensures that we
deliver excellent services and products to our customers. Our team of
professionals is dedicated to provide information technology solutions adapted
to global clients.We strive to be the best at everything we do. Our primary goal
is to provide your company with the software tools needed to address real world
business issues and opportunities.

6
1.3 TYPES OF PRODUCT AND SEERVICES
PROVIDED BY IBASE TECHNOLOGIES

Ibase Technologies is a company where every solution and service is


based on innovation. The industry's wide range of services that they provide
speak volumes about the skills the industry professionals possess. iBase
Technologies consultants and resources possess strong industry knowledge and
domain expertise. With a strong focus on reviving the software development
and web development market, iBase technologies intends to use its skills and
bring a brand new approach to the industry.

Below are some of the services provided by iBase technologies


 Data science
 Python
 Machine learning
 IOT
 Android
 Php
 Web Development

 IBase Projects
iBase Electrosoft LLP. grows exponentially through its research in
technology, an initiative by iBase Electrosoft LLP. works towards development
of research based software, Real time Projects and embedded/electronics for
research & development purposes. With rapid growth in technology and
innovation, iBase Electrosoft LLP has now the largest collection of software.
We develop innovative and unique software as well as electronics based
systems used to automate various needs/tasks. We build these systems to be
used as a reference for further development and studies by engineering students,
researchers and enthusiasts.
Below are some of the products provided by iBase technologies
 E-Attendance
 www.mahavidyalay.in
 Home Appliances
 Agricultural product

7
1.4 VISION AND MISSION OF INDUSTRY
 Mission
iBase Wants to make every one able to learn the things
practically.to improve the skill and quality of students
through special ibase training programs.

 Vision
iBase will be a global learner platform for the student

which will based on quality and skill oriented education .

8
Chapter 2 : Types of major equipment /instruments
/machines used in industry

2.1 COMPUTERS / DESKTOP PC


A computer is an electronic device that manipulates information, or data.
It has the ability to store, retrieve, and process data. You may already know that
you can use a computer to type documents, send email, play games, and browse
the Web. You can also use it to edit or create spreadsheets, presentations, and
even videos.
Popular modern programming languages, such as JavaScript and Python, work
through multiple forms of programming paradigms. Functional programming,
which uses mathematical functions to give outputs based on data input, is one of
the more common ways code is used to provide instructions for a computer.
The most powerful computers can perform extremely complex tasks, such as
simulating nuclear weapon experiments and predicting the development
of climate change. The development of quantum computers, machines that can
handle a large number of calculations through quantum parallelism (derived
from superposition), would be able to do even more-complex tasks.

9
2.2 SWITCH
Network switch (also called switching hub, bridging hub, officially MAC
bridge is a computer networking device that connects devices on a computer
network by using packet switching to receive, process, and forward data to the
destination device.
A network switch is a multiport network bridge that uses hardware addresses to
process and forward data at the data link layer (layer 2) of the OSI model. Some
switches can also process data at the network layer (layer 3) by additionally
incorporating routing functionality. Such switches are commonly known as
layer-3 switches or multilayer switches
Switches for Ethernet are the most common form of network switch. The first
Ethernet switch was introduced by Kalpana in 1990. Switches also exist for
other types of networks including Fibre Channel, Asynchronous Transfer Mode,
and Infinite Band
Unlike less advanced repeater hubs, which broadcast the same data out of each
of its ports and let the devices decide what data they need, a network switch
forwards data only to the devices that need to receive it

10
2.3 ROUTER
A router is a device that connects two or more packet-switched networks
or sub-network. It serves two primary functions: managing traffic between these
networks by forwarding data packets to their intended IP addresses, and
allowing multiple devices to use the same Internet connection.

There are several types of routers, but most routers pass data between LANs
(local area networks) and WANs (wide area networks). A LAN is a group of
connected devices restricted to a specific geographic area. A LAN usually
requires a single router.

A WAN, by contrast, is a large network spread out over a vast geographic area.
Large organizations and companies that operate in multiple locations across the
country, for instance, will need separate LANs for each location, which then
connect to the other LANs to form a WAN. Because a WAN is distributed over
a large area, it often necessitates multiple routers and switches.

11
2.4 HUB
An Ethernet hub, active hub, network hub, repeater hub, multiport
repeater, or simply hub is a network hardware device for connecting multiple
Ethernet devices together and making them act as a single network segment. It
has multiple input/output (I/O) ports, in which a signal introduced at the input of
any port appears at the output of every port except the original incoming.
A hub works at the physical layer (layer 1) of the OSI model. A repeater hub
also participates in collision detection, forwarding a jam signal to all ports if it
detects a collision. In addition to standard 8P8C ("RJ45") ports, some hubs may
also come with a BNC or an Attachment Unit Interface (AUI) connector to
allow connection to legacy 10BASE2 or 10BASES network segments.

12
Chapter 3 : Manufacturing Processes along with
production planning and control methods

3.1 MANUFACTURING PROCESS


Software development provides a series of steps for programmers to create
computer programs. This process makes up the phases in the software
development life cycle. Understanding the software development method offers
vast opportunities in the IT industry.
There are six major steps in the software development life cycle, including:

 Need Identification : Needs identification is a market research and


brainstorming stage of the process. Before a firm builds software, it needs
to perform extensive market research to determine the product's viability.
Developers must identify the functions and services the software should
provide so that its target consumers get the most out of it and find it
necessary and useful.

 Requirement Analysis : Requirement analysis is the second phase in


the software development life cycle. Here, stakeholders agree on the
technical and user requirements and specifications of the proposed
product to achieve its goals. This phase provides a detailed outline of
every component, the scope, the tasks of developers and testing
parameters to deliver a quality product.

 Design : Design is the third stage of the software development process.


Here, architects and developers draw up advanced technical
specifications they need to create the software to requirements.
Stakeholders will discuss factors such as risk levels, team composition,
applicable technologies, time, budget, project limitations, method and
architectural design.

 Development and Implementation : The next stage is the


development and implementation of the design parameters. Developers
code based on the product specifications and requirements agreed upon in

13
the previous stages. Following company procedures and guidelines, front-
end developers build interfaces and back-ends while database
administrators create relevant data in the database. The programmers also
test and review each other's code.

 Testing : The testing phase checks the software for bugs and verifies its
performance before delivery to users. Testers use exploratory testing if
they have experience with that software or a test script to validate the
performance of individual components of the software. They notify
developers of defects in the code. If developers confirm the flaws are
valid, they improve the program, and the testers repeat the process until
the software is free of bugs and behaves according to requirements.

 Deployment and Maintenance : Once the software is defect-free,


the developers can deliver it to customers. After the release of a
software's production version, the IT software development company
creates a maintenance team to manage issues clients encounter while
using the product. Maintenance can be a hot-fix if it is a minor issue but
severe software failures require an update.

3.2 PRODUCTION PLANNING


The increasing demand of customized product from the customer end is a
major driving theme of this transformation in the industry. The traditional
processes are highly efficient for batch production and low cost scaling in bulk
manufacturing but are relatively time consuming inefficient for manufacturing
customized products.
Traditional process planning being used in many industries presently is
completely based only on the knowledge and experience of the individual or
team working on the system. The people working on the systems are technology
experts from experience rather than knowledge. The existing demand for
change to the new technology solutions can be a big transition for such
individuals.
These include process planning, operation sequencing and scheduling. The
collaboration of various product parameters and consumer needs in each stage
of product development cycle allows the manufacturer to continuously improve

14
the product quality and optimize the manufacturing costs effectively in real
time. A good production planning software that automatizes the various tasks of
the product development cycle is a must for mass customization and improved
efficiency in Industry

3.3 CONTROL METHODS


Software control is the process of the physical storage in a definitive
software library of all software to ensure that only correctly released, licensed,
and authorized versions of software are in use. Processes in this category
include the tracking of releases, patches, service packs, and bug fixes. Software
distribution is an additional process through which all software from the
definitive software library is disseminated to authorized users to ensure that
only correctly released and licensed versions of software are in use. This is
often the single most expensive activity to a support organization.
Software control tasks foster consistency and stability amongst the software
engineering effort, product configuration, and change processing and
assimilation end developers. Software control tasks must maintain configuration
records identifying the architectural configuration to provide the management
oversight of the evolving software architecture. Software control tasks must
maintain configuration records to provide traceability among elements of the
software architecture, design decision, change proposals, and requests back to
software specifications and stakeholder needs.

15
Chapter 4 : Testing of raw materials ,components and
finished products

4.1 TESTING OF RAW MATERIALS


Software development should be conducted in a project context. This
establishes a relationship between the technical end developer to design,
implement, and test a software product, and management and control
mechanisms intended to ensure that project expenditures, resources, and
schedule milestones are satisfied. This highlights the fact that all products must
be designed to be manufactured and supported throughout their life cycle to
achieve established cost and schedule objectives. Terms like design-to-
cost, design-to-support, and life-cycle costs denote that a product has a
perceived value, and the engineering of the product must ensure that its value,
as expressed in purchase price, operational costs, etc., is in line with the benefits
it offers its customers and stakeholders. Therefore, architectural
design decisions must account for the impact a design solution bears on project
resources, as well as the customer or consumer.

4.2 COMPONENTS OF TESTING SOFTWARE


Component Testing is a type of software testing in which usability of each
individual component is tested. Along with the usability test, behavioral
evaluation is also done for each individual component. To perform this type of
testing, each component needs to be in independent state and also should be in
controllable state. Each component of the software should be user
comprehensible.

Assume in a software application consists of five components. The testing of


each component is done independently by the tester as part of the development
cycle before integration testing is performed on it. It helps in saving time by
finding the bugs at a very early stage in the cycle. Test structure tools or
debugging tools are used for this type of testing as this is performed by
programmers on the code written by them and with the support of IDE. Defects
detected during component testing are fixed as soon as possible when they are
found without maintaining the records.

16
Component testing has an important role in finding the issue. Before processing
with the integration testing, component testing is performed in order to ensure
that each component of the application is working correctly and as per
requirement.
 Objective of Component Testing :
 To verify the input and output behavior of the system.
 To check the usability of each component.
 To test the user comprehensibility of the software.
 To test the state of the each components of the system.

4.3 FINISHED SOFTWARE PRODUCTS


Developing software requires an excellent understanding of the process of
building software systems to make them more efficient and defect-free. It also
requires a good vision of the system's entire life cycle to plan its future
evolution and shape it to the benefit of your organization.

17
Chapter 5 : Major Material handling products

5.1 MAJOR HANDLING MATERIAL PRODUCTS


Material handling is the movement, protection, storage and control of
materials and products throughout manufacturing, warehousing, distribution,
consumption and disposal. As a process, material handling incorporates a wide
range of manual, semi-automated and automated equipment and systems that
support logistics and make the supply chain work.
There is a variety of manual, semi-automated and automated material handling
equipment and technologies available to aid in the movement, protection,
storage and control of materials and products throughout manufacturing,
distribution, consumption and disposal.
A company‟s material handling system and processes are put in place to
improve customer service, reduce inventory, shorten delivery time, and lower
overall handling costs in manufacturing, distribution and transportation.

18
Chapter 6 : Safety procedures followed and safety gear
used

6.1 SHEDULE AND PROCEDURES OF MAINTAINCE


1) Removal of dust from the Servers, Networking equipment and Personnel
Computers The dust from the Networking equipment will be blown out using
vacuum cleaner through ventilations of the equipment whereas servers and
personnel computers to be done after removing the covers. This is as per the
recommendation of the equipment manufacturer on maintenance. All the
console/auxiliary ports of routers, RAS, servers etc, will be checked for
functionality and verification will be done whether the console ports of the
servers are connected to the respective PCs.
Broken/missing covers of Servers, Routers, PCs etc. Loose Connector Strips at
the back of PCs. Broken connectors etc. will be checked and recorded in the
observation column of P.M report so that all of these that need to be replaced
can be done at the earliest.

2) The AC Input to the servers, Personnel computers and the DC input to


networking equipment and grounding for the equipment will be tested for
compliance with the standards (As per the values mentioned in the PM Report
against each equipment).

3) Proper airflow to the equipment and the temperature at the node (ideal
temperature mentioned in the PM report) will be tested and recorded. The Fan
unit in the racks will be checked for functionality and will be replaced if the
same is not functional

4) The logs of routers and access servers will be check to ensure that the el and
e3 links are error free. Any notification found on the log will be intimated to the
Nodes in-charge and DNW and corrective actions will also be recommended. In
addition to recommendation on corrective actions, any implementation required
as a part of maintenance support will be provided. The CPU utilization and
memory utilization of routers and Access server will have tested and the same
will be recorded. Show environment command will be used to record the

19
environment details as shown by the router, RAS. RAS/ROUTERS will be
checked for any misconfigurations. Check for flapping of links will be done
through log/SYSLOG and its effect on the performance of router will be
observed

5) The health of RSP, VIP Cards, Port Adapters, and modem cards etc. will be
checked. The version of the IOS loaded in the Master flash and slave flash will
be checked to ensure that the same is in sync with the recommendation given by
the data network. Removing the RSP in slot2 of 7500 Router, the functionality
of RSP in slot3 will be checked and the RSP will be swapped after verifying the
same. Upgradation if necessary will be done in consultation with Data
Networks. Note: This Process will be done only once in 2 years, not to be
followed for every P.M.

6.2 BREAKDOWN MAINTAINACE AND PROCEDURE


TO ESTIMATE LOSS IN PRODUCTION
Breakdown maintenance is maintenance performed on equipment that has
broken down and either planned or unplanned.is unusable. It is based on a
breakdown maintenance trigger. It may be
Sometimes breakdown maintenance is performed b of an unplanned event. For
example, if a critical piece of machinery breaks, the maintenance is performed
because of the imminent need for that machine to operate again. However,
breakdown maintenance can be planned for in advance, which is what we might
call "good" breakdown maintenance.
Here are some examples in which breakdown maintenance is applicable:
 Equipment can't be repaired a 1 (inaccessible, designed to not be
repaired)
 Asset consists of inexpensive or easy-to-replace parts.
 Non-critical pieces of equipment (like hand tools).
 Objects/equipment that are disposable or meant to be replaced at the end
of their lifespan.
 Short-life assets (batteries, high flow pumps).

20
6.3 SAFETY MEASURES
safety measures are taken in industries to prevent and to improve the
productivity. Safety measures are essential for the people working in the
industry and for the overall benefit of the organization. By incorporating safety
measures at various levels, the awareness on safety will improve. It is possible
to prevent accidents. It is possible to handle emergencies in a better way. There
will not be a breakdown of machines. Employees will be able to work without
being exposed to conflicting conditions.

21
Chapter 7 : Particulars of Practical Experiences in
industry

7.1 INTRODUCTION OF PYTHON


 History of Python
In the late 1980s, history was about to be written. It was that time when
working on Python started. Soon after that, Guido Van Rossum began
doing its application-based work in December of 1989 at Centrum
Wiskunde & Informatica (CWI) which is situated in the Netherlands. It
was started firstly as a hobby project because he was looking for an
interesting project to keep him occupied during Christmas.

The programming language in which Python is said to have succeeded is


ABC Programming Language, which had interfacing with the Amoeba
Operating System and had the feature of exception handling. He had
already helped to create ABC earlier in his career and he had seen some
issues with ABC but liked most of the features. After that what he did
was really very clever. He had taken the syntax of ABC, and some of its
good features. It came with a lot of complaints too, so he fixed those
issues completely and had created a good scripting language that had
removed all the flaws.

The inspiration for the name came from BBC‟s TV Show – „Monty
Python‟s Flying Circus‟, as he was a big fan of the TV show and also he
wanted a short, unique and slightly mysterious name for his invention and
hence he named it Python!

 Why Python ?
 Python works on different platforms (Windows, Mac, Linux,
Raspberry Pi, etc).
 Python has a simple syntax similar to the English language.
 Python has syntax that allows developers to write programs with
fewer lines than some other programming languages.
 Python runs on an interpreter system, meaning that code can be
executed as soon as it is written. This means that prototyping can
be very quick.
 Python can be treated in a procedural way, an object-oriented way
or a functional way.

22
7.2 FLOW CONTROL OF PYTHON
Python programming language provides the following types of loops to handle
looping requirements. Python provides three ways for executing the loops.
While all the ways provide similar basic functionality, they differ in their syntax
and condition checking time.

 While loop
In python, while loop is used to execute a block of statements repeatedly
until a given condition is satisfied. And when the condition becomes false,
the line immediately after the loop in the program is executed.
Syntax : while expression
statement(s)
Ex.

Output :

 For loop
For loop executes a sequence of statements multiple times and
abbreviates the code that manages the loop variable.

23
Syntax : for (initialization statement; test expression; update statement)
{
// statements
}
Ex. :

Output :

 If….else loop
Decision making is required when we want to execute a code only if a
certain condition is satisfied.
Syntax : if test expression:
statement(s)

24
Ex. :

Ouput :

7.3 DATA STRUCTURE IN PYTHON


The basic Python data structures in Python include list, set, tuples, and
dictionary. Each of the data structures is unique in its own way. Data structures
are “containers” that organize and group data according to type.
The data structures differ based on mutability and order. Mutability refers to the
ability to change an object after its creation. Mutable objects can be modified,
added, or deleted after they‟ve been created, while immutable objects cannot be
modified after their creation. Order, in this context, relates to whether the
position of an element can be used to access the element.

25
 List
A list is defined as an ordered collection of items, and it is one of the
essential data structures when using Python to create a project. The term
“ordered collections” means that each item in a list comes with an order
that uniquely identifies them. The order of elements is an inherent
characteristic that remains constant throughout the life of the list.

Syntax : List_A = [item 1, item 2, item 3….., item n]

Ex.

Output :

26
 Tuple
A tuple is a built-in data structure in Python that is an ordered
collection of objects. Unlike lists, tuples come with limited functionality.

The primary differing characteristic between lists and tuples is mutability.


Lists are mutable, whereas tuples are immutable. Tuples cannot be
modified, added, or deleted once they‟ve been created. Lists are defined
by using parentheses to enclose the elements, which are separated by
commas.

Syntax : tuple_A = (item 1, item 2, item 3,…, item n)

Ex. :

Output :

27
 Set
A set is defined as a unique collection of unique elements that do not
follow a specific order. Sets are used when the existence of an object in a
collection of objects is more important than the number of times it
appears or the order of the objects. Unlike tuples, sets are mutable – they
can be modified, added, replaced, or removed.

Syntax : set_a = {“item 1”, “item 2”, “item 3”,….., “item n”}

Ex. :

Output :

28
 Dictionary
The dictionary Data Structure in Python is an unordered collection of
items. While other Data Structures use only one value as the element, the
dictionary is a slightly more compound data structure. It makes use of
two elements i.e. a pair of elements, namely, a key and a value.

Syntax : Dict = { ' Tim': 18, xyz,..}

Ex.

Output :

29
7.4 GRAPHICAL USER INTERFACE IN PYTHON
 Tkinter library
Tkinter is the standard GUI library for Python. Python when
combined with Tkinter provides a fast and easy way to create GUI
applications. Tkinter provides a powerful object-oriented interface to the
Tk GUI toolkit.

The name Tkinter comes from Tk interface. Tkinter was written by Steen
Lumholt and Guido van Rossum, then later revised by Fredrik Lundh.
Tkinter is free software released under a Python license.

Creating a GUI application using Tkinter is an easy task. All you need to
do is perform the following steps –
 Import the Tkinter module.
 Create the GUI application main window.
 Add one or more of the above-mentioned widgets to the GUI
application.
 Enter the main event loop to take action against each event
triggered by the user.

Ex.

30
Output :

 Turtle library
turtle is a pre-installed Python library that enables users to create
pictures and shapes by providing them with a virtual canvas. The
onscreen pen that you use for drawing is called the turtle and this is what
gives the library its name.

The turtle Library is primarily designed to introduce children to the world


of programming. With the help of Turtle's library, new programmers can
get an idea of how we can do programming with Python in a fun and
interactive way.
The roadmap for executing a turtle program follows 4 steps:
 Import the turtle module
 Create a turtle to control.
 Draw around using the turtle methods.
 Run turtle.done().

31
Ex.

Output :

32
7.5 NUMPY AND PANDAS LIBRARY IN PYTHON
 Numpy library
NumPy is a Python library used for working with arrays. It also has
functions for working in domain of linear algebra, fourier transform, and
matrices. NumPy was created in 2005 by Travis Oliphant. It is an open
source project and you can use it freely.

NumPy (Numerical Python) is an open-source core Python library for


scientific computations. It is a general-purpose array and matrices
processing package. Python is slower as compared to Fortran and other
languages to perform looping. To overcome this we use NumPy that
converts monotonous code into the compiled form

Why Use NumPy?


 In Python we have lists that serve the purpose of arrays, but they are slow
to process.
 NumPy aims to provide an array object that is up to 50x faster than
traditional Python lists.
 The array object in NumPy is called ndarray, it provides a lot of
supporting functions that make working with ndarray very easy.
 Arrays are very frequently used in data science, where speed and
resources are very important.

Ex.

33
Output :

34
 Pandas library
Pandas is an open source Python package that is most widely used
for data science/data analysis and machine learning tasks. It is built on
top of another package named Numpy, which provides support for multi-
dimensional arrays. As one of the most popular data wrangling packages,
Pandas works well with many other data science modules inside the
Python ecosystem, and is typically included in every Python distribution,
from those that come with your operating system to commercial vendor
distributions like ActiveState‟s ActivePython.

he pandas we are writing about in this chapter have nothing to do with the
cute panda bears. Endearing bears are not what our visitors expect in a
Python tutorial. Pandas is the name for a Python module, which is
rounding up the capabilities of Numpy, Scipy and Matplotlab. The word
pandas is an acronym which is derived from "Python and data analysis"
and "panel data".

Ex.

35
Chapter 8 : Short report of the Project

8.1 INTRODUCTION OF PROJECT


 Title : Make a Audiobook using GUI
An audiobook is a recording or voiceover of a book or other work read
aloud. You can listen to audiobooks on any smartphone, tablet, computer,
home speaker system, or in-car entertainment system.

An audiobook is nothing but a book that was recorded in an audio format.


It can also be stated as a book that is being read aloud. Audiobook helps in
improvising one‟s vocabulary, comprehension and pronunciation of
words. Hope some of you guys are bookaholic but lazy to read it on your
own. So it‟s time to create your audiobook by using few codes of Python.
This will make you enjoy audiobooks without any subscription fee, that
was imposed on platforms like Audible, Scribd, etc.

The voice generated by the above command can be saved into an mp3 file.
The file will be saved in the exact location where our code has been saved.
Hence saving the audio file will help users to access it in future days.

Reading stories or essays or any text can be arduous, however an audio


reading of the text is convenient and does‟nt require as much
concentration as reading requires. In this project, I implemented a simple
PDF to audio converter. This code scans page(s) of PDF and reads it using
audio, to the user. While this project is good for simple text reading, it
does not perform good if a scientific paper with equations is given to it
because equations are not supported to be read in Pytesseract OCR library
which I used to convert image to text.

 Modules which is used in Project


 import tkinter
 import gTTS
 import sys,os
 import pyttsx3
 import filedialog

36
8.2 CODING\

import tkinter as tk
from gtts import gTTS
from tkinter import ttk
from tkinter import *
from tkinter import filedialog
#from tkinter.ttk import combobox
import pyttsx3
import sys,os
from tkinter import Frame
from tkinter.filedialog import askopenfilename
#from tkinter import Label

root=tk.Tk()
root.title("Audiobook")
root.geometry("900x450+100+100")
root.resizable(False,False)
root.configure(bg="#f2994a")

engine = pyttsx3.init() #create object

def speaknow():
text=text_area.get(1.0,END)
gender=gender_combobox.get()
speed=speed_combobox.get()
voices=engine.getProperty('voice')

37
def setvoice():
if(gender=='Male'):
engine.setProperty('voice',voices[0])
engine.say(text)
engine.runAndWait()
else:
(gender=='Female')
engine.setProperty('voice',voices[1])
engine.say(text)
engine.runAndWait()

if (text):
engine.setProperty("volume",1)
if(speed=="Fast"):
engine.setProperty('rate',250)
setvoice()
elif(speed=='Normal'):
engine.setProperty('rate',150)
setvoice()
else:
engine.setProperty('rate',60)
setvoice()

def download():
text=text_area.get(1.0,END)
gender=gender_combobox.get()
speed=speed_combobox.get()
voices=engine.getProperty('voices')

38
def setvoice():
if(gender=='Male'):
engine.setProperty('voice',voices[0])
path=filedialog.askdirectory
os.chdir('F:\A ibase python project')
engine.save_to_file(text,'F:\A ibase python project\\text.mp3')
engine.runAndWait()
else:
(gender=='Female')
engine.setProperty('voice',voices[1])
path=filedialog.askdirectory
os.chdir('F:\A ibase python project')
engine.save_to_file(text,'F:\A ibase python project\\text.mp3')
engine.runAndWait()

if (text):
if(speed=="Fast"):
engine.setProperty('rate',250)
setvoice()
elif(speed=='Normal'):
engine.setProperty('rate',150)
setvoice()
else:
engine.setProperty('rate',60)
setvoice()

39
def clear():
text_area.delete(1.0, END)

def prev():
my_project=filedialog.askopenfilename()
os.system("my_project")

def exit():
root.destroy()

#Diplay Icon
image_icon=tk.PhotoImage(file="F:/A ibase python project/text-to-speech.png")
root.iconphoto(False,image_icon)

#Up frame
Top_frame=Frame(root,bg="white",width=900,height=100)
Top_frame.place(x=0,y=0)

Logo=tk.PhotoImage(file="F:/A ibase python project/speaker logo.png")


#tk.Label(Top_frame,image=Logo,bg="white").place(x=5,y=5)
tk.Label(Top_frame,image=Logo).place(x=5,y=5)

Label(Top_frame,text="Audiobook...",font="Stencil 20
italic",bg="white",fg="black").place(x=100,y=50)

40
#------------

text_area=Text(root,font="Robote 20",bg="white",relief=GROOVE,wrap=WORD)
text_area.place(x=10,y=150,width=400,height=250)

tk.Label(text="VOICE",font="arial 10 bold",bg="#305065",fg="white").place(x=500,y=160)
tk.Label(text="SPEED",font="arial 10 bold",bg="#305065",fg="white").place(x=740,y=160)

gender_combobox=ttk.Combobox(root,values=['Male','Female'],font="arial
14",state='r',width=10)
gender_combobox.place(x=460,y=200)
gender_combobox.set('Male')

speed_combobox=ttk.Combobox(root,values=['Fast','Normal','Slow'],font="arial
14",state='r',width=10)
speed_combobox.place(x=700,y=200)
speed_combobox.set('Normal')

#---Button

imageicon=PhotoImage(file="")
btn=Button(root,text="Convert TO
Mp3",compound=LEFT,image=imageicon,width=150,font="arial 14
bold",command=speaknow)
btn.place(x=450,y=280)

imageicon2=PhotoImage(file="")
save=Button(root,text="Save",compound=LEFT,image=imageicon2,width=160,font="arial

41
14 bold",command=download)
save.place(x=670,y=280)

clear = Button(root, text =


"Clear",compound=LEFT,image=imageicon2,width=60,font="arial 10 bold",command =
clear)
clear.place(x=340,y=370)

prev=Button(root,text="Previous
Rec",compound=LEFT,image=imageicon2,width=150,font="arial 14 bold",command=prev)
prev.place(x=450,y=350)

exit=Button(root,text="Exit",compound=LEFT,image=imageicon2,width=150,font="arial 14
bold",command=exit)
exit.place(x=670,y=350)

root.mainloop()

42
8.3 OUPUT OF PROJECT

43

You might also like