Industrial Training Report

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 50

A REPORT OF FOUR WEEKS INDUSTRIAL TRAINING

At

ThinkNEXT Technologies Private Limited

SUBMITTED IN PARTIAL FULFILMENT OF THE REQUIREMENT FOR THE AWARD OF

THE DEGREE OF

BACHELOR OF ENGINEERING

(Computer Science and Engineering)

JUNE-JULY 2021

SUBMITTED BY:

NAME: AVINASH TIWARI


REGISTRATION NO.: 1940062

DEPARTMENT OF COMPUTER SCIENCE ENGINEERING

SANT LONGOWAL INSTITUTE OF ENGINEERING AND TECHNOLOGY


CONTENTS

Topic Page no.

Certificate by Company/Industry/Institute i
Candidate’s Declaration ii
Abstract iii
Acknowledgement iv
List of figures v
List of tables vi

CHAPTER 1 INTRODUCTION TO ORGANISATION


1.1 1
1.2 2
CHAPTER 2 SOFTWARE TRAINING WORK UNDERTAKEN
2.1 3
2.2 5
2.3 13
2.4 19
2.5 23
2.6 25

CHAPTER 3 INDUSTRIAL TRAINING WORK UNDERTAKEN 26

CHAPTER 4 PROJECT WORK 29

CHAPTER 5 RESULTS AND DISCUSSION 37

CHAPTER 6 CONCLUSION AND FUTURE SCOPE 38


CERTIFICATE

i
SANT LONGOWAL INSTITUTE OF ENGINEERING AND TECHNOLOGY

CANDIDATE’S DECLARATION

I , AVINASH TIWARI, hereby declare that I have undertaken 4 weeks Industrial Training at

ThinkNEXT Technologies Private Limited during a period from 28th June 2021 to 24th July 2021 in

partial fulfilment of requirements for the award of degree of B.E.(Computer Science and

Engineering) at SANT LONGOWAL INSTITUTE OF ENGINEERING AND TECHNOLOGY,

LONGOWAL,PUNJAB. The work which is being presented in the training report submitted to

Department of Computer Science and Engineering at SANT LONGOWAL INSTITUTE OF

ENGINEERING AND TECHNOLOGY, LONGOWAL is an authentic record of training work.

Signature of student

The industrial training Viva-voce Examination of ______________________ has been held on

________________ and accepted.

Signature of examiner

ii
ABSTRACT

This Report presents the experience and skills gained during 4 weeks of industrial training

undertaken at ThinkNEXT Technologies Private Limited.

My Training was on the Python, During this period, I acquired practical knowledge and skills in

using engineering software, also times were spent on small projects related to python. I was able

to make calculator in Python .

This report discusses the skills gained and experience gathered during the period of training,

justifying the relevance of the scheme in equipping students with needed technical competence to

thrive in the real world.

iii
ACKNOWLEDGEMENT

I would like to extend my sincere gratitude and appreciation to all those who joined all their efforts

in making my industrial training successful.

Special thanks goes to my academic supervisors for their excellent work done during my industrial

training.

This industrial training was quite a learning experience for me at each and every step. At the same

time it has given me confidence to work in professional setup. I feel the experience gained during

the training will lead me to gain the bright prospect in the future. First of all I would like to thank

Head of T&P Department, R K Mishra sir, for giving me the opportunity to work in this esteemed

organization, which not only has increased our awareness about latest fields. With deep sense of

gratitude, I express my sincere thanks to Dr. Manminder Singh Sir, for his active support and

continuous guidance without which it would have been difficult for me to complete this industrial

training. I will like to thanks the teacher and staff of ThinkNEXT Technologies Private Limited for

taking keen interest in our training and for giving valuable suggestions throughout the industrial

training period and also I would like to thank those one who helped me directly and indirectly to

complete this industrial training successfully.

Avinash Tiwari
BTech(CSE)

iv
List of figures

Figures Page no.


Fig 1.1 13
Fig 1.2 14
Fig 1.3 15
Fig 1.4 17
Fig 3.1 28
Fig 4.1 36
Fig 4.2 36
Fig 4.3 37
Fig 4.4 37

Fig 4.5 38

Fig 4.6 38

Fig 4.7 39

Fig 4.8 39

v
List of Tables

Tables Page no.

Table 1.1 8
Table 1.2 8
Table 1.3 9
Table 1.4 10
Table 1.5 11
Table 1.6 12
Table 1.7 12
Table 1.8 14
Table 1.9 17

vi
CHAPTER 1.1

INTRODUCTION TO ORGANISATION

ThinkNEXT Technologies Private Limited: ThinkNEXT is a leading global IT

services, consulting and business solution provider company that helps global

enterprises reimagine and transform their businesses through digital technology

transformation.

The company harness the power of

 web development

 mobile application development

 Robotics

 Cloud

 digital marketing

 analytics

 and emerging technologies to help client adapt to digital world and make

them successful.

 Machine learning

1
CHAPTER 1.2

WHAT ThinkNext DO?

 Development: Render all kind of development and designing services such as

website designing , web development, internet marketing, phone application

development, ERP Packages, Software testing, Machine learning and much

more.

 Training: They have been providing training of Development all kinds of

programs, apps, digital marketing to thousands of students already.

 Consultancy: They provide reliable project consultancy services in the

industry of Information and Technology, providing information to millions of

Industrialists and Entrepreneurs to jump-start their careers, start business,

learn technologies, help reduce risk and give high return.

2
SOFTWARE TRAINING WORK UNDERTAKEN

CHAPTER 2.1

INTRODUCTION TO PYTHON

Python is a widely used high-level, general-purpose, interpreted, dynamic programming language.

Its design philosophy emphasizes code readability, and its syntax allows programmers to express

concepts in fewer lines of code than would be possible in languages such as C++ or Java. The

language provides constructs intended to enable clear programs on both a small and large scale.

Python supports multiple programming paradigms, including object-oriented, imperative and

functional programming or procedural styles. It features a dynamic type system and automatic

memory management and has a large and comprehensive standard library. Python interpreters are

available for installation on many operating systems, allowing Python code execution on a wide

variety of systems.

Scripting Language: A scripting or script language is a programming language that supports

scripts, programs written for a special run-time environment that automate the execution of tasks

that could alternatively be executed one-by-one by a human operator.

Scripting languages are often interpreted (rather than compiled). Primitives are usually the

elementary tasks or API calls, and the language allows them to be combined into more complex

programs. Environments that can be automated through scripting include software applications,

web pages within a web browser, the shells of operating systems (OS), embedded systems, as well

as numerous games.

3
A scripting language can be viewed as a domain-specific language for a particular environment; in

the case of scripting an application, this is also known as an extension language. Scripting

languages are also sometimes referred to as very high-level programming languages, as they

operate at a high level of abstraction, or as control languages.

Object Oriented Programming Language: Object-oriented programming (OOP) is a

programming paradigm based on the concept of "objects", which may contain data, in the form of

fields, often known as attributes; and code, in the form of procedures, often known as methods. A

distinguishing feature of objects is that an object's procedures can access and often modify the data

fields of the object with which they are associated (objects have a notion of "this" or "self").

In Object Oriented Programming, computer programs are designed by making them out of objects

that interact with one another. There is significant diversity in object oriented programming, but

most popular languages are class-based, meaning that objects are instances of classes, which

typically also determines their type.

History of Python

History Python was conceived in the late 1980s, and its implementation was started in December

1989 by Guido van Rossum at CWI in the Netherlands as a successor to the ABC language (itself

inspired by SETL) capable of exception handling and interfacing with the Amoeba operating

system. Van Rossum is Python's principal author, and his continuing central role in deciding the

direction of Python is reflected in the title given to him by the Python community, benevolent

dictator for life (BDFL).

“Python is an experiment in how much freedom programmers need. Too much freedom and

nobody can read another's code; too little and expressiveness is endangered.” - Guido van Rossum

4
CHAPTER 2.2

DATA TYPES IN PYTHON

Data Type (this is called dynamic typing).:- Data types determine whether an object can do

something, or whether it just would not make sense. Other programming languages often

determine whether an operation makes sense for an object by making sure the object can never be

stored somewhere where the operation will be performed on the object (this type system is called

static typing). Python does not do that. Instead it stores the type of an object with the object, and

checks when the operation is performed whether that operation makes sense for that object

Python has many native data types. Here are the important ones:-

 Booleans are either True or False

 Numbers can be integers (1 and 2), Floats (1.1 and 1.2), Complex numbers.

 Strings are sequences of Unicode characters, e.g. an HTML document. Bytes and

bytearrays, e.g. a JPEG image file.

 Lists are ordered sequences of values.

 Tuples are ordered, immutable sequences of values

 Sets are unordered bags of values.

5
 Variable:- Variables are nothing but reserved memory locations to store values. This means

that when you create a variable you reserve some space in memory. Based on the data type of a

variable, the interpreter allocates memory and decides what can be stored in the reserved

memory. Therefore, by assigning different data types to variables, you can store integers,

decimals or characters in these variables.

Ex: counter = 100

# An integer

assignment miles = 1000.0

# A floating

point name = "John"

# A string

String In programming terms, we usually call text a string. When you think of a string as a

collection of letters, the term makes sense. All the letters, numbers, and symbols in this book

could be a string. For that matter, your name could be a string, and so could your address.

Creating Strings In Python, we create a string by putting quotes around text. For example, we

could take our otherwise useless

 Concatenation

Ex:-

"hello"+"world"

"helloworld"
6

 Repetition

Ex:-

"hello"*3

"hellohellohello"

 Indexing

Ex:-

"hello"[0]

"h”

 Slicing(from end)

Ex:-

"hello"[-1] "hello"[1:4]

"o" "ell"

 Size

Ex:-

len("hello")

 Comparison

Ex:-

"hello" < "jello"


1

 Search

Ex:-

"e" in "hello"

 Python Operator - Arithmetic Operator

Operator Meaning Example


“+” Add two operands or unary x+y +2
plus
“-” Subtract right operand from the x-y-2
left or unary minus
“*” Multiply two operands x*y
“/” Divide two operands x/y
“%” Modulus- remainder of the x%y
division
“//” Floor division- division that x//y
results into whole number
“**” Exponent- left operand raised x**y(x to the power y)
to the power of right

Table 2.1

Comparison Operator

Operator Meaning Example


“>” Greater than- True if left x>y
operand is greater than right
“<” Less than- True if left operand x<y
is smaller than right
“==” Equal to- True if both operands x==y
are equal
“!=” Not equal to- True if operand x!=y
are not equal
“>=” Greater than equal to- True if x>=y
left operand is greater than or
equal to right
“<=” Less than equal to- True if left x<=y
operand is Less than or equal
to right
Table 2.2

Tuples :- A tuple is a sequence of immutable Python objects. Tuples are sequences, just like lists.

The differences between tuples and lists are, the tuples cannot be changed unlike lists and tuples

use parentheses.

Accessing Values in Tuples: To access values in tuple, use the square brackets for slicing

along with the index or indices to obtain value available at that index.

For example − tup1 = ('physics', 'chemistry', 1997,

2000); tup2 = (1, 2, 3, 4, 5, 6, 7 ); print "tup1[0]: ", tup1[0] print "tup2[1:5]: ", tup2[1:5]

When the above code is executed, it produces the following result − tup1[0]: physics

tup2[1:5]: [2, 3, 4, 5]

Basic Tuples Operations

Tuples respond to the + and * operators much like strings; they mean concatenation and

repetition here too, except that the result is a new tuple, not a string. In fact, tuples respond to all of

the general sequence operations we used on strings in the prior chapter –

Python Expression Result Description


Len((1,2,3)) 3 Length
(1,2,3)+(4,5,6) (1,2,3,4,5,6) Concatenation
(‘H!’,)*4 (‘H!’, ‘H!’, ‘H!’, ‘H!’) Repetition
3 in (1,2,3) True Membership
For x in (1,2,3): print x 123 Iteration

Table 2.3
9

Built-in Tuple Functions

Python includes the following tuple functions −

Serial no Function with Description


1 cmp(tuple1,tuple2) Compares elements of both tuples.
2 len(tuple) Gives total length of tuple
3 max(tuple) Returns item from tuple with max value.
4 min(tuple) returns item from the tuple with min value.
5 tuple(seq) converts a list into tuple

Table 2.4

List

The list is a most versatile datatype available in Python which can be written as a list of comma-

separated values (items) between square brackets. Important thing about a list is that items in a list

need not be of the same type.

Creating a list is as simple as putting different comma-separated values between square brackets.

For example − list1 = ['physics', 'chemistry', 1997, 2000]; list2 = [1, 2, 3, 4, 5 ]; list3 = ["a", "b",

"c", "d"];

Similar to string indices, list indices start at 0, and lists can be sliced, concatenated and so on.

Accessing Values in Lists:

To access values in lists, use the square brackets for slicing along with the index or indices to

obtain value available at that index. For example − list1 = ['physics', 'chemistry', 1997, 2000];

list2 = [1, 2, 3, 4, 5, 6, 7 ]; print "list1[0]: ", list1[0] print "list2[1:5]: ", list2[1:5]

Output:

list1[0]: physics
list2[1:5]: [2, 3, 4, 5]

10

Update:

list = ['physics', 'chemistry', 1997, 2000];

print "Value available at index 2 :”

print list[2] list[2] = 2001;

print "New value available at index 2 : " print list[2]

Output:

Value available at index 2 : 1997

New value available at index 2 : 2001

Delete:

list1 = ['physics', 'chemistry', 1997, 2000]; print list1

del list1[2];

print "After deleting value at index 2 : "

print list1 ['physics', 'chemistry', 1997, 2000]

Output:

After deleting value at index 2 : ['physics', 'chemistry', 2000]

Basic list operation

Python Expression Result Description


Len([1,2,3]) 3 Length
[1,2,3]+[4,5,6] [1,2,3,4,5,6] Concatenation
[‘H!’,]*4 [‘H!’, ‘H!’, ‘H!’, ‘H!’] Repetition
3 in [1,2,3] True Membership
For x in [1,2,3]: print x 123 Iteration

Table 2.5
11

Built-in List Functions

Python includes the following List functions −

Serial no Function with Description


1 cmp(list1,list2) Compares elements of both lists.
2 len(list) Gives total length of list.
3 max(list) Returns item from list with max value.
4 min(list) returns item from the list with min value.
5 list(seq) converts a tuple into list

Table 2.6

Python includes following list methods

Serial No. Method with Description


1 list.append(obj) Append object to list.
2 list.count(obj) Returns count of how many times obj occurs in list.
3 list.extend(seq) Appends the content of seq to list
4 list.index(obj) Returns the lowest index in list that obj appears
5 list.insert(index,obj) Insert object obj into list at offset index
6 list.pop(obj=list[-1]) Removes and return last object or obj from list
7 list.remove(obj) Removes object obj from list
8 list.reverse() Reverses object of list in place
9 list.sort([func]) Sort objects of list, use compare function if given

Table 2.7
12

CHAPTER 2.3

LOOPS AND CONDITIONAL STATEMENTS IN PYTHON

Loop definition: Programming languages provide various control structures that allow for more

complicated execution paths.

A loop statement allows us to execute a statement or group of statements multiple times.

The following diagram illustrates a loop statement –


Fig 2.1

13

Python programming language provides following types of loops to handle looping requirements.

Loop type Description


For Executes a sequence of statements multiple times and abbreviates
the code that manages the loop variable.
While Repeats a statement or group of statements while a given
condition is TRUE. It tests the condition before executing the
loop body.
Nested Loop you can use one or more loop inside any another while, for or
while loop.

Table 2.8

Loop Example:

 For Loop:

Fig-2.2

for mynum in [1, 2, 3, 4, 5]:

print ("Hello", mynum )


14

Output:-

Hello 1

Hello 2

Hello 3

Hello 4

Hello 5

 While Loop:

Fig 2.3

Ex:-

count = 0

while(count< 4):
print ('The count is:', count)

count = count + 1

15

Output:-

The count is: 0

The count is: 1

The count is: 2

The count is: 3

Conditional Statements:

Decision making is anticipation of conditions occurring while execution of the program and

specifying actions taken according to the conditions. Decision structures evaluate multiple

expressions which produce TRUE or FALSE as outcome. You need to determine which action

to take and which statements to execute if outcome is TRUE or FALSE otherwise.


16

Fig 2.4

Python programming language provides following types of decision making statements.

Statement Description
If statement An If statement consists of a Boolean expression followed by one or
more statements.
If else statement An if statement can be followed by an optional else statement, which
executes when the boolean expression is FALSE
Nested if we can use one if or else if statement inside another if or else if
statements(s).
Table 2.9

Example:

17

If Statement:

a=33

b=200

If b>a:

print(“b”)

If...Else Statement:

a=200

b=33

if b>a:

print(“b is greater than a”)

else:

print(“a is greater than b”)


18

CHAPTER 2.4

FUNCTION IN PYTHON

Function:- A function is a block of code which only runs when it is called.You can pass data,

known as parameters, into a function.

A function can return data as a result.

Creating a Function

In Python a function is defined using the def keyword

def my_function():

  print("Hello from a function"

Calling a Function

To call a function, use the function name followed by parenthesis:

def my_function():

  print("Hello from a function")

my_function()
19

Arguments

Information can be passed into functions as arguments.

Arguments are specified after the function name, inside the parentheses. You can add as many

arguments as you want, just separate them with a comma.

The following example has a function with one argument (fname). When the function is called, we

pass along a first name, which is used inside the function to print the full name:

def my_function(fname):

  print(fname + " Refsnes")

my_function("Emil")

my_function("Tobias")

my_function("Linus")

Default Parameter Value

The following example shows how to use a default parameter value.

If we call the function without argument, it uses the default value:

def my_function(country = "Norway"):

  print("I am from " + country)


my_function("Sweden")

my_function("India")

my_function()

20

my_function("Brazil")

Passing a List as an Argument

You can send any data types of argument to a function (string, number, list, dictionary etc.), and it

will be treated as the same data type inside the function.

E.g. if you send a List as an argument, it will still be a List when it reaches the function:

def my_function(food):

  for x in food:

    print(x)

fruits = ["apple", "banana", "cherry"]

my_function(fruits)

Return Values

To let a function return a value, use the return statement:

def my_function(x):

  return 5 * x

print(my_function(3))
print(my_function(5))

print(my_function(9))

21

Python Lambda

A lambda function is a small anonymous function.

A lambda function can take any number of arguments, but can only have one expression.

Syntax:- lambda arguments : expression

Example:-

Add 10 to argument a, and return the result:

x = lambda a : a + 10

print(x(5))
22

CHAPTER 2.5

TRY AND EXCEPT IN PYTHON

The try block lets you test a block of code for errors.

The except block lets you handle the error.

The finally block lets you execute code, regardless of the result of the try- and except blocks.

Exception Handling

When an error occurs, or exception as we call it, Python will normally stop and generate an error

message.

EX:-

The try block will generate an exception, because x is not defined:

try:

  print(x)

except:

  print("An exception occurred")

Since the try block raises an error, the except block will be executed.
Without the try block, the program will crash and raise an error:

23

Many Exceptions

You can define as many exception blocks as you want, e.g. if you want to execute a special block

of code for a special kind of error:

Example

Print one message if the try block raises a NameError and another for other errors:

try:

  print(x)

except NameError:

  print("Variable x is not defined")

except:

  print("Something else went wrong")

Finally:- The finally block, if specified, will be executed regardless if the try block raises an error

or not.

Example

try:

  print(x)

except:
  print(“Something went wrong”)

finally:

  print(“The ‘try except’ is finished”)

24

CHAPTER 2.6

FILE HANDLING IN PYTHON

File Handling

The key function for working with files in Python is the open() function.

The open() function takes two parameters; filename, and mode.

There are four different methods (modes) for opening a file:

"r" - Read - Default value. Opens a file for reading, error if the file does not exist

"a" - Append - Opens a file for appending, creates the file if it does not exist

"w" - Write - Opens a file for writing, creates the file if it does not exist

"x" - Create - Creates the specified file, returns an error if the file exists

Syntax

To open a file for reading it is enough to specify the name of the file:

f = open("demofile.txt")

The code above is the same as:


f = open("demofile.txt", "rt")

Because "r" for read, and "t" for text are the default values, you do not need to specify them.

25

CHAPTER 3

INDUSTRIAL TRAINING WORKTAKEN

Calculator

Code:-

from tkinter import *
root=Tk()
root.title('Calculator')
root.geometry('281x250')
root.resizable(0,0)
expr=''

def show(n):
    global expr
    expr+=n
    num.set(expr)

def clearall():
    global expr
    expr=''
    num.set(0)

def calculate():
    global expr
    result=str(eval(expr))
    num.set(result)
    expr=''

num=StringVar()

expression_field=Entry(root,textvariable=num,width=23,justify=RIGHT,bg='light blue
',font=('arial',16,'bold')).grid(columnspan=4,ipady=8)
clear=Button(root,text='C',height=2,width=30,command=lambda:clearall()).grid(row=1
,column=0,columnspan=3)
divide=Button(root,text='/',height=2,width=7,command=lambda:
('/')).grid(row=1,column=3)

26
btn7=Button(root,text=7,height=2,width=7,command=lambda:show('7')).grid(row=2,colu
mn=0,sticky=NSEW)

btn8=Button(root,text=8,height=2,width=7,command=lambda:show('8')).grid(row=2,colu
mn=1,sticky=NSEW)
btn9=Button(root,text=9,height=2,width=7,command=lambda:show('9')).grid(row=2,colu
mn=2,sticky=NSEW)
multiply=Button(root,text='X',height=2,width=7,command=lambda:show('*')).grid(row=
2,column=3,sticky=NSEW)

btn4=Button(root,text=4,height=2,width=7,command=lambda:show('4')).grid(row=3,colu
mn=0,sticky=NSEW)
btn5=Button(root,text=5,height=2,width=7,command=lambda:show('5')).grid(row=3,colu
mn=1,sticky=NSEW)
btn6=Button(root,text=6,height=2,width=7,command=lambda:show('6')).grid(row=3,colu
mn=2,sticky=NSEW)
minus=Button(root,text='-',height=2,width=7,command=lambda:show('-')).grid(row=3,c
olumn=3,sticky=NSEW)

btn1=Button(root,text=1,height=2,width=7,command=lambda:show('1')).grid(row=4,colu
mn=0,sticky=NSEW)
btn2=Button(root,text=2,height=2,width=7,command=lambda:show('2')).grid(row=4,colu
mn=1,sticky=NSEW)
btn3=Button(root,text=3,height=2,width=7,command=lambda:show('3')).grid(row=4,colu
mn=2,sticky=NSEW)
add=Button(root,text='+',height=2,width=7,command=lambda:show('+')).grid(row=4,col
umn=3,sticky=NSEW)

btn0=Button(root,text=0,height=2,width=21,command=lambda:show('0')).grid(row=5,col
umn=0,columnspan=2,sticky=NSEW)
decimal=Button(root,text='.',height=2,width=7,command=lambda:show('.')).grid(row=5
,column=2,sticky=NSEW)
equal=Button(root,text='=',height=2,width=7,command=lambda:calculate()).grid(row=5
,column=3,sticky=NSEW)

root.mainloop()

27
Screenshot

Fig 3.1
28

CHAPTER 4 PROJECT WORK

TextUtils

Code:

Views.py

from django.http import HttpResponse

from django.shortcuts import render

def index(request):

# intro = {'name':'Avinash', 'place':'Kanpur'}

return render(request, 'index.html')

# return HttpResponse('Home')

def analyze(request):

# Get text

djtext = request.GET.get('text', 'default')

# Check checkbox values

removepunc = request.GET.get('removepunc', 'off')

fullcaps = request.GET.get('fullcaps', 'off')


newLineRemover = request.GET.get('newLineRemover', 'off')

spaceRemover = request.GET.get('spaceRemover', 'off')

# print(removepunc)

29

# check which checkbox is on

if removepunc == 'on':

punctuations = '''!()-{}[];:'"\,<>./?@#$%^&*~_'''

analyzed = ''

for char in djtext:

if char not in punctuations:

analyzed = analyzed + char

params = {'purpose': 'Removed Punctuations', 'analyzed_text': analyzed}

return render(request, 'analyze.html', params)

elif fullcaps == 'on':

analyzed = ' '

for char in djtext:

analyzed = analyzed + char.upper()

params = {'purpose': 'Changed to Upper case', 'analyzed_text': analyzed}

return render(request, 'analyze.html', params)

elif newLineRemover == 'on':


analyzed = ''

for char in djtext:

if char != '\n':

30

analyzed = analyzed + char

params = {'purpose': 'newLineRemoved', 'analyzed_text': analyzed}

return render(request, 'analyze.html', params)

elif spaceRemover == 'on':

analyzed = ''

for ind, char in enumerate(djtext):

if not (djtext[ind] == ' ' and djtext[ind + 1] == ' '):

analyzed = analyzed + char

params = {'purpose': 'spaceRemoved', 'analyzed_text': analyzed}

return render(request, 'analyze.html', params)

else:

return HttpResponse('Error 404')

Analyze.html

<!DOCTYPE html>
<html lang="en">

<head>

<meta charset="UTF-8">

31

<title>Analyzing Text..</title>

</head>

<!--<style>-->

<!-- body{-->

<!-- background-color:black;-->

<!-- color : white-->

<!-- }-->

<!--</style>-->

<body>

<h1>Your Analyzed Text - {{purpose}}</h1>

<p>

{{ analyzed_text}}

</p>

</body>

</html><!DOCTYPE html>

<html lang="en">
<head>

<meta charset="UTF-8">

<title>Analyzing Text..</title>

32

</head>

<!--<style>-->

<!-- body{-->

<!-- background-color:black;-->

<!-- color : white-->

<!-- }-->

<!--</style>-->

<body>

<h1>Your Analyzed Text - {{purpose}}</h1>

<p>

{{ analyzed_text}}

</p>

</body>

</html>

Urls.py
from django.contrib import admin

from django.urls import path

from . import views

33

urlpatterns = [

path('admin/', admin.site.urls),

path('', views.index, name='index'),

# path('about', views.about, name= 'about'),

# path('RemovePunc', views.RemovePunc, name='RemovePunc'),

# path('Capitalize This', views.CapitalizeFirst, name='Capitalize This'),

# path('NewLineRemover', views.NewLineRemover, name='NewLineRemover'),

# path('SpaceRemover', views.SpaceRemover, name='SpaceRemover'),

# path('CharCount', views.CharCount, name='CharCount'),

path('analyze', views.analyze, name='analyze'),

Index.html

<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/html">

<head>
<meta charset="UTF-8">

<title>TextUtils</title>

</head>

34

<style

body{

background-color : yellowgreen

</style>

<body>

<!-- main ek masoom si template hoon bhaiya-->

<!-- {{name}} is from {{place}}-->

<h1>Welcome to my WebPage</h1>

<form action="/analyze" method="get">

<textarea name="text" style="margin: 0px; width: 1472px; height:


221px;"></textarea><br>

<input type="checkbox" name="removepunc">Remove Punctuation <br>

<input type="checkbox" name="fullcaps">UPPERCASE <br>

<input type="checkbox" name="newLineRemover">newLineRemover <br>

<input type="checkbox" name="spaceRemover">spaceRemover <br>


<button type="submit">Analyze Now</button>

</form>

</html>

35

Screenshot

Fig 4.1
Fig 4.2

36

Fig 4.3
Fig 4.4

37

Fig 4.5
Fig 4.6

38

Fig 4.7
Fig 4.8

39

CHAPTER 5 RESULTS AND DISCUSSION

TextUtils

A tool for analyzing text data in Django backend

It is a simple django project or website in which we can Analyze text.

What Can We do from Textutils ?

1)Remove Punctuations :- This is a function used to remove punctuations from a sentence.

2)UPPERCASE :- This is used to convert all the letters in uppercase.

3)New Line Remove :- This is used to remove waste new lines.


4)Extra Spaces Remover :- This is used to remove extra space between letters of a word

5)Numbers Remover :-

Requirments

python3
django

40

CHAPTER 6 CONCLUSION AND FUTURE SCOPE

I believe the trial has shown conclusively that it is both possible and desirable to use Python as the
principal teaching language:

• It is Free (as in both cost and source code).

• It is trivial to install on a Windows PC allowing students to take their interest further. For many
the hurdle of installing a Pascal or C compiler on a Windows machine is either too expensiveyr too
complicated

• It is a flexible tool that allows both the teaching of traditional procedural programming and
modern OOP.

• It can be used to teach a large number of transferable skills.


• It is a real-world programming language that can be and is used in academia and the commercial
world.

• It appears to be quicker to learn and, in combination with its many libraries, this offers the
possibility of more rapid student development allowing the course to be made more challenging
and varied. and most importantly, its clean syntax offers increased understanding and enjoyment
for students.

The training program having three destination was a lot more useful than staying at one place
throughout the whole 4 weeks. In my opinion. I have gained lots of knowledge and experience
needed to be successful in great engineering challenge as in my opinion, Engineering is after all a
Challenge ,and not a job .

41

You might also like