You are on page 1of 32

lOMoARcPSD|25738836

python and html internship

PYTHON (Lovely Professional University)

Studocu is not sponsored or endorsed by any college or university


Downloaded by mohan dewangan (mdewangan088@gmail.com)
lOMoARcPSD|25738836

First Year Industrial Training Report


Basics of Python Language

Submitted in
Partial fulfillment of the degree of Bachelor of Technology
Rajasthan Technical University

By

Aman Pandey
(PCE19CS017)

Downloaded by mohan dewangan (mdewangan088@gmail.com)


lOMoARcPSD|25738836

Department of Computer Engineering


Poornima College of Engineering, Jaipur
(Academic Year 2019-20)

Downloaded by mohan dewangan (mdewangan088@gmail.com)


lOMoARcPSD|25738836

CERTIFICATE BY COMPANY/ INDUSTRY / INSTITUTE

Downloaded by mohan dewangan (mdewangan088@gmail.com)


lOMoARcPSD|25738836

Downloaded by mohan dewangan (mdewangan088@gmail.com)


lOMoARcPSD|25738836

Downloaded by mohan dewangan (mdewangan088@gmail.com)


lOMoARcPSD|25738836

Downloaded by mohan dewangan (mdewangan088@gmail.com)


lOMoARcPSD|25738836

Downloaded by mohan dewangan (mdewangan088@gmail.com)


lOMoARcPSD|25738836

ACKNOWLEDMENT

A project of such a vast coverage cannot be realized without help from numerous sources
and people the organization . I is thankful to Mr. Shashikant Singhi,
c h a i r m a n , PGC and Dr. Mr. Mahesh Bundele ,Director, PCE for providing me a
platform to carry out such a training successfully
I am also very grateful to Mr. Amitesh Kumar(HOD, first year) for his kind
support.
I would like to take this opportunity to show my gratitude towards Dr. Deepti Lodha
Ma’am(T.P.O) who helped me in successful completion of my First Year Practical
Training. They have guided, motivated & were source of inspiration form to carry out the
necessary proceedings for the training to be completed successfully.

I am also grateful to Mr. Amarjeet bharti for his guidance and support.
I am thankful to Mr. Amarjeet bharti
For his kind support and providing me expertise of the domain to develop the project.

I would also like to express my hearts felt appreciation to all of my friends whose direct
or indirect suggestions help me to develop this project and to entire team members for
their valuable suggestions

Lastly, thanks to all faculty members of Computer Engineering department for their
moral support and guidance

Submitted
by:

Downloaded by mohan dewangan (mdewangan088@gmail.com)


lOMoARcPSD|25738836

Aman
Pandey

ABSTRACT

This course introduces the basics of Python 3, including


conditional execution and iteration as control structures, and
strings and lists as data structures. You'll program an on-
screen Turtle to draw pretty pictures. You'll also learn to draw
reference diagrams as a way to reason about program
executions, which will help to build up your debugging skills.

Downloaded by mohan dewangan (mdewangan088@gmail.com)


lOMoARcPSD|25738836

TABLE OF CONTENTS

CHAPTER.1: Introduction 10

..1.1. Python 10

..1.2. Scripting Language 10

...1.3. Object Oriented Programming 11

..1.4. History of python 11

CHAPTER.2:.Data.Types.&.Operator 12

Downloaded by mohan dewangan (mdewangan088@gmail.com)


lOMoARcPSD|25738836

...2.1.Data.Types12

2.2.Variables12

..2.3.String13

2.3.1.Operations.on.strings13

2.4.Python.Operators 14

2.4.1.Arithmetic.Operators

2.4.2.Comparison.Operator

2.4.3.Logical.Operato

CHAPTER 3: Tuple & List

3.1.Tuple

3.1.1...Accessing.Tuple.Values

3.1.2...Basic.Tuples.Operations

3.2.List

3.2.1.Basic.List.Operation

3.2.2.Built-in.List.Functions.&.Methods

CHAPTER.4:.Iterations..&.Conditional.Statements

4.1..Iteration.

4.1.1.for.statement

Downloaded by mohan dewangan (mdewangan088@gmail.com)


lOMoARcPSD|25738836

4.1.2.while.statement.

4.2.Conditional.Statement

4.2.1...if.Statement

4.2.2...if-else.statement
4.2.3..Nested.if
4.2.4.if-elif-else.ladder

CHAPTER.5:..The.Turtle.Module

5.1.Introduction
.5.2.Plotting.Using.Turtle

Reference : Course taken

List of Tables

Table No Title Page No.

1.1 Company Profile 4

2.1 Keywords 3

2.2 Arithmetic Operators 4

Downloaded by mohan dewangan (mdewangan088@gmail.com)


lOMoARcPSD|25738836

2.3 Relational Operators 5

2.4 Assignment Operators 5

2.5 logical Operators 5

2.6 memberships Operators 5

2.7 identities Operators 5

LIST OF FIGURES

Figure Number and Name Page No

Downloaded by mohan dewangan (mdewangan088@gmail.com)


lOMoARcPSD|25738836

Figure 1: Flowchart of for loop 21

Figure 2 : Flowchart of while loop 22


Figure 3: Flowchart of if statement 23

Figure 4 : Flowchart of if – else statement 24


Figure 5: Flowchart of nested if statement 25

Figure 6: Flowchart of if-elif-else ladder 26


Figure 7: Output for turtle program 29

Downloaded by mohan dewangan (mdewangan088@gmail.com)


lOMoARcPSD|25738836

Chapter-1
Introduction
A. Significance of this Training:
The summer internship is paramount for undergraduates and scholar students. It is the best way to
take advantages of your summer holidays. From the summer break, students have time to take a new
step for their future.

They have space to get to know what your skills want to do new in your career and where does your
mind want to stick for your future path. The summer internship provides the glittering path to the
students and gives an experience of the workplace.

An internship helps to improve the efficiency of the student's capabilities to do work as an employee
and give knowledge about working culture. It is a valuable path for students to give them proficiency
of skill.

Profit of Summer Internship:


1. Find your future goals with related skills.

2. Working culture and learning the culture.

3. Learn what work suits to you and help in your career.

4. Build new bonding with experienced persons.

5. Help to improve references and jobs.

Summary:
As the points of profit internship, it proved that the internship is important for the students
and freshers for their future goals. It is useful for undergraduates to reach their goals from
the path of an internship as a successful person.

B. Company Profile:

Table1.1 company Profile

Downloaded by mohan dewangan (mdewangan088@gmail.com)


lOMoARcPSD|25738836

Introduction to Python

Introduction
Python is an object oriented language, interpreted, dynamic and multipurpose programming
language.
It was created by Guido Van Rossum in 1989. Like perl, python source code is also available under
GNU general Public License (GPL).
Python is derived from many languages, including ABC, Modula-3, C, C++, Algol-68, small
talk, and UNIX shell and other scripted languages.
Many large companies use the python programming languages include NASA, Google, YouTube

Python Features
There are lot of features provided by python programming languages
 Python is easy to use and high level language. Thus it is programmer-friendly language.
 It is more expressive. The sense of expressive is the code is easily understandable.
 Python can equally on different platforms such as Windows, Linux, Unix, Macintosh etc.
 It is freely available(www.python.org). The source-code is also available. Therefore, it is open
source.
 Python has a large and broad library.
 Graphical user interfaces can be developed using python.
 It can be easily integrated with languages like C, C++, JAVA etc.

2.1 Python Applications


Python as a whole can be used in any sphere of development.
The major regions where python proves to be handy.
Console Based Applications
Python can be used to develop console based applications. For example: I Python
Audio or video based applications
Python proves handy in multimedia section. Some of real applications are: Tim Player, c play etc.
3D CAD Applications
Fandango is a real application which provides full features of CAD.

Downloaded by mohan dewangan (mdewangan088@gmail.com)


lOMoARcPSD|25738836

Web Applications
Python can also be used to develop web based application. Some important developments are: Python
Wiki Engines, Po coo, Python Blog Software etc.
Enterprise Applications
Python can be used to create applications which can be used within an Enterprise or an organisation.
Some real time applications are: Open Erp, Tryton, Picalo etc.
Applications for Images
Using Python several application can be developed for image.Application developed are:V Python,
Gogh, img Seek etc.

2.2 Tokens:
Tokens can be defined as a punctuator mark, reserved words and each individual word in a statement.
Token is the smallest unit inside the given program.
There are following tokens in Python:
 Keywords
 Identifiers
 Literals
 Operators
2.2.1 Keywords or Reverse Words
Keywords are special reversed words which convey a special meaning to the compiler/interpreter.
Each keyword has a special meaning and a special meaning and a specific operation. List of
Keywords used in Python are:

True False None And As


Asset Def class Continue Break
Else Finally elif Del Except
Global For If From Import
Nonlocal In not Is Lambda
Raise Try Or Return Pass
Table2.1: keywords
2.2.2 Identifiers:
Identifiers are the names given to the fundamental building blocks in a program. These can be
variables, class, object, functions, lists dictionaries etc.

Downloaded by mohan dewangan (mdewangan088@gmail.com)


lOMoARcPSD|25738836

There are certain rules for naming i.e. Identifiers.


 An identifier is a long sequence of characters and numbers.
 No special character except underscore ( _ ) can be used as identifier.
 Keyword should not be used as an identifier name.
 Python is case sensitive. So Using case is significant.
 First character of an identifier can be character, underscore but not digit.
2.2.3. Operators
1. Arithmetic Operators
2. Relational Operators
3. Assignment Operators
4. Logical Operators
5. Membership Operators
6. Identity Operators
7. Bitwise Operators

Arithmetic Operators:
// Integer Division
+ To perform addition
- To perform addition
* To perform addition
/ To perform addition
% To return remainder after division
** Perform exponent (raise to power)

Table2.2 Arthmetic operators

Downloaded by mohan dewangan (mdewangan088@gmail.com)


lOMoARcPSD|25738836

Relational Operators:
< Less than
> Greater than
<= Less than or equal to
>= Greater than equal to
== Equal to
!= Not equal to
<> Not equal to (similar to !=)

Table 2.3. Relational operators


Assignment Operators:
= Assignment
/= Divide and Assign
+= Add and assign
-= Subtract and assign
*= Multiply and assign
%= Modulus and assign
**= Exponent and assign
//= Floor division and assign

Table 2.4. Assignment operators

Logical Operators:
and Logical AND(When both conditions are true and output will be true
Or Logical OR (if any one condition is true output will be true)
Not Logical NOT (Compliment the condition i.e., reverse)

Table 2.5. Logical operators

Membership Operators:
in Returns if a variable is in sequence of another variable, else false
not in Returns true if a variable is not in sequence of another variable, else false

Table 2.6. Membership operators

Identity Operators:
is Returns true if identity of two operands are same, else false
is not Returns true if identity of two operands are not same, else false

Downloaded by mohan dewangan (mdewangan088@gmail.com)


lOMoARcPSD|25738836

Table 2.7. Identity operators

2.3. Comments
1) Single lined comment:
In case user wants to specify line comment, then comment must start with #
# This is a single line comment.

2) Multi lined comment:


Multi lined comment can be given inside triple quates.
””” This
Is
Multi lined comment”””

Assigning values to Variable


Assigning single value to multiple variables
x=y=z=50
print x
print y
print z
O/p
50
50
50
Assigning multiple values to multiple variables
a, b, c=5, 10, 15
print a
print b
print c
O/p
5

Downloaded by mohan dewangan (mdewangan088@gmail.com)


lOMoARcPSD|25738836

10
15

Downloaded by mohan dewangan (mdewangan088@gmail.com)


lOMoARcPSD|25738836


Chapter –3
HTML,CSS and Javascript for Web Developers

1.
1.1 Pr
ogr
ammi
ngi
nWebDevel
opment

So,whenawebdesi gnerisgivenanendgoal li
ke"createawebpagethathas
t
hisheader,thisfont,thesecolors,t
hesepictur
es,andanani mateduni
corn
walki
ngacros sthes creenwhenuser scli
ckonthisbutt
on,"t
hewebdesigner'sjob
i
stotakethatbi gideaandbr eakitaparti
ntoti
nypieces,andthentr
ansl
atethese
pi
ecesint
oi nstruct
ionst hatt
hecomput ercanunder st
and--incl
udi
ngputt
ingall
t
heseinst
ructionsint hecor r
ectorderorsyntax.

Everypageont hewebt hatyouvi sitisbuil


tusi ngasequenceofsepar ate
i
nstr
ucti
ons ,oneafteranother.Yourbr owser( Chrome,Firef
ox,Safari
,andsoon)
i
sabi gactorintranslat
i
ngcodei ntosomet hingwecans eeonoursc reensand
evenint
eractwith.Itcanbeeas ytof orgetthatcodewi t
houtabr owserisjus
ta
t
extfi
le--i
t'
swheny ouputthattex tfi
leintoabr owsert
hatthemagi chappens.
Wheny ouopenawebpage,y ourbr owserf etchestheHTMLandot her
pr
ogrammi nglanguagesi nvol
v edandi nterpretsit
.

HTMLandCSSar eact
uall
ynott
echnical
lyprogrammingl
anguages;t
hey'r
ejust
pagest
ruct
ureandstyl
einf
ormat
ion.ButbeforemovingontoJavaScr
iptand
ot
hertr
uelanguages
,youneedtoknowt hebasicsofHTMLandCSS,ast heyare
onthefr
ontendofever
ywebpageandappl i
cati
on.

Inthev er
yearl
y1990s,HTMLwastheonlyl
anguageavail
ableontheweb.Web
dev el
opershadt
opainst
aki
ngl
ycodest
atics
it
es,pagebypage.Al ot
'
schanged
sincethen:Nowther
earemanycomputerpr
ogramminglanguagesavai
l
able.

I
nthi
spost,I
'
llt
alkaboutHTML,CSS,andoneoft
hemos
tcommonpr
ogr
ammi
ng
l
anguages
:JavaScri
pt

Downloaded by mohan dewangan (mdewangan088@gmail.com)


lOMoARcPSD|25738836

1.
2 HTML,CSS,&JavaScr
ipt
:ATut
ori
al
Anov
ervi
ew:

 HTMLpr ovi
dest
hebasi
cst
ruct
ureofsit
es,whi
chi
senhancedandmodi
fied
byot
hert
echnologi
esl
i
keCSSandJav aScr
ipt
.

 CSSi
susedt
ocont
rol
present
ati
on,f
ormat
ti
ng,andl
ay .
out

 JavaScr
ipti
susedt
ocont
rol
thebehav
iorofdi
ffer
entel
ement
s.

Now,l
et'
sgoovereachonei
ndi
vi
duall
ytohel
py ouunderst
andther
oleseach
pl
aysonawebsit
eandthenwe'
ll
coverhowtheyfitt
oget
her.Let
'
sst
artwi
thgood
ol
'HTML

Downloaded by mohan dewangan (mdewangan088@gmail.com)


lOMoARcPSD|25738836

1.
2.1 HTML

HTMLisatt hecor
eofev erywebpage,regardl
esst hecomplexi
tyofasit
eor
numberoftechnol
ogiesinv
olved.I
t'
sanes sent
ial
s kil
lf
oranywebpr of
essi
onal
.
It
'
sthestar
tingpoi
ntforanyonelear
ninghowt ocreatecont
entfort
heweb.And,
l
ucki
lyf
orus ,i
t'
ssurpri
si
nglyeasytolear
n.

1.3 How does HTML work?

HTMLs tandsf orHyperTextMar


kupLanguage."Markuplanguage"meansthat,
r
athert
hanusi ngapr ogr
amminglanguaget
oper f
ormfuncti
ons,HTMLusest ags
t
oidenti
fydifferentt
ypesofcont
entandthepurposestheyeachservetot
he
webpage.

Letmes howyouwhatImean.Tak ealookatt


hear t
i
clebelow.I
fIweretoask
youtolabel
thetypesofcontentonthepage,you'
dprobablydoprett
ywell
:
Ther
e'stheheaderatthetop,thenasubheaderbel
owi t
,thebodytext
,andsome

Downloaded by mohan dewangan (mdewangan088@gmail.com)


lOMoARcPSD|25738836

1.
3.1 CSS

CSSstandsf
orCascadi
ngStyl
eSheet
s.Thispr
ogr
ammi nglanguagedictat
es
howt
heHTMLel ementsofawebsi
t
eshouldact
ual
lyappearont hef
rontendof
t
hepage.

1.4 HTML vs CSS

HTMLpr ovidestherawtoolsneededt ostruct


urecont
entonawebsit
e.CSS,on
t
heot herhand,helpstost
ylethiscontentsoitappear
stotheusert
hewayitwas
i
ntendedtobeseen.Thesel anguagesarek eptsepar
atet
oensurewebsi
t
esare
buil
tcorr
ectl
ybeforethey'
rerefor
matted.

I
fHTMLi
sthedr
ywal
l
,CSSi
sthepai
nt.

WhereasHTMLwast hebasicstructureofyourwebsi t
e,CSSi swhatgives
yourenti
rewebsit
eitss t
yle.Thosesli
ckcolors,int
eres
ti
ngf ont
s,andback ground
i
mages ?Allt
hankst oCSS.Thi slanguageaffectstheenti
remoodandt oneofa
webpage,maki ngitanincredibl
ypower f
ultool--andanimpor t
ants ki
l
lforweb
devel
operstolear
n.I t
'
salsowhatal l
owswebsi testoadapttodiffer
entscreen
si
zesanddevicetypes .

Toshowy ouwhatCSSdoest oawebsit


e,lookatthefol
lowi
ngt
wos cr
eenshot
s.
Thefir
stscr
eenshoti
smycolleague'
sblogpost,butshowninBasi
cHTML,and
thesecondscr
eenshoti
sthatsameblogpostwit
hHTMLandCSS.

Downloaded by mohan dewangan (mdewangan088@gmail.com)


lOMoARcPSD|25738836

1.
4.1 JavaScr
ipt

JavaScri
ptisamorecomplicat
edlanguagethanHTMLorCSS,andi twasn'
t
rel
easedinbetafor
m unti
l1995.Nowadays,JavaScr
ipti
ssuppor
tedbyall
modernwebbr owsersandisusedonal mostever
ysiteont
hewebf ormore
powerfulandcompl
exfuncti
onali
ty
.

1.5 What is JavaScript used for?

Jav
aScr i
pti
sal ogi
c-basedprogrammi ngl anguagethatcanbeusedtomodif
y
websit
econtentandmak ei
tbehav ei
ndi fferentway
si nres
ponsetoauser'
s
act
ions.Commonusesf orJavaScri
ptincludeconfir
mat i
onboxes
,cal
ls-
to-
acti
on,
andaddingnewi denti
ti
estoexist
inginfor
mat i
on.

I
nshor t
,JavaScri
pti
sapr ogr
ammi nglanguaget hatletswebdevel
opersdesi
gn
i
nter
acti
vesites.Mos
tofthedy namicbehavioryou'llseeonawebpagei sthank
s
t
oJav aScri
pt,whi
chaugmentsabr owser'
sdef aultcontrol
sandbehavi
ors
.

Downloaded by mohan dewangan (mdewangan088@gmail.com)


lOMoARcPSD|25738836

 Collect all HTML tags on the web page and store them in
variables;
 Perform a check if each tag contains text;
 Highlight the tags with found text values upon mouse hover;
 Wrap the text inside a text box and allow modification;
 Distinct the modified text from the unmodified (e.g. Outline the
text box); The next step of the edit process would be to save the
changes by clicking on the ‘Save’ button. What happens is the
following:
 Input values are collected and stored in arrays;
 A new JSON object is created;
 Whenever the user changes a text value, it is stored locally inside
a JSON object;
 Display new text values on reload; Optionally, the user should be
able to reset all text nodes in their original state.

Downloaded by mohan dewangan (mdewangan088@gmail.com)


lOMoARcPSD|25738836

Downloaded by mohan dewangan (mdewangan088@gmail.com)


lOMoARcPSD|25738836

Downloaded by mohan dewangan (mdewangan088@gmail.com)


lOMoARcPSD|25738836

CONCLUSI
ON

In a nutshell, this internship has been an excellent and rewarding experience and rewarding
experience. As a conclusion, I can that this internship was a great experience. Thanks to this project. I
acquired deeper knowledge concerning my technical skills, but I also personally benefited.

There are high opportunities available for the students who want to work in this field.

Many private and public organization hire web designer for their online work and website
development. With the rapid advent of online industry, the demand of web development professionals
is increasing

Downloaded by mohan dewangan (mdewangan088@gmail.com)


lOMoARcPSD|25738836

REFERENCES

Downloaded by mohan dewangan (mdewangan088@gmail.com)

You might also like