Docsity

Getting Started With Python, Lecture notes of Computer science

Toggle sidebar
bg1
lassmate
Date 25/6]12
GETTINGSTARTED WITHPYTHORN
heword Pthon
&eems to be Scary but1itis
moinl
usedorIHs píayrulnessrandpleascutprcductvih Betatan
pEDAranain-
GanguagewasdevelcpedbCauido
n
KosSDm inFehruary1991.he Pdhan ishasedcnhwa
pEogranminglonguaeS AGC languageCreplacemertotBASIO
Ond inModula Pthen on easuo
leornutpowerl
obiect
aried
ed roaeing longuage
PthonPluses
Pthen languageCome itobeingineasly1990suett
isccmpelinaHh ever popularlcnguageSlikeC
Java ehc Athoua itislne ectar
reruypech
opplicadcn
ye it
hasaony senaths
thadnakes
ifaA0od
choiceAorbeingCalledas proaraminganguage cr
nanu SifuctionS.
DEos touse
Puthon icormpact and veryensause abiedoriended
prosmminglanaagewh
verySimple Syntax rules.
fis
xeryhighleyellanguage
eYer piogAmmertiendlu
DExpressivelanguge
Picthon's
expressiveneSS
means Itiamore capable
o
expressinghecOdes
puposehanmany therlanguages
RedSon beingdewerlines
sCode and siapleSuntax.
terprdted language
Pthou isaniherprettesdlangugeandnot acampiled
pf3
pf4
pf5

Partial preview of the text

Download Getting Started With Python and more Lecture notes Computer science in PDF only on Docsity!

lassmate Date 25/6]

GETTINGSTARTED WITHPYTHORN

heword

Pthon

&eems to be

Scary but1itis

moinl

usedor IHs pĂ­ayrulnessrandpleascutprcductvih Betatan

pEDAranain-

Ganguagewas develcped b Cauido n KosSDm in Fehruary1991.he Pdhan ishasedcnhwa

pEogranminglonguaeS AGC languageCreplacemertot BASIO

Ond inModula Pthen on easuo

leornutpowerl

obiect

aried ed

roaeing

longuage Pthon

Pluses

Pthen languageCome itobeingineasly1990suett isccmpelinaHh ever popularlcnguageSlikeC Java ehc Athoua itislne ectar reruypech opplicadcn ye it hasaony senaths thad nakes ifa A0od choiceAorbeingCalled as proaraminganguage cr

nanu

SifuctionS. DEos

to

use Puthon i cormpact and veryensause

abiedoriended

prosmminglanaagewh very Simple Syntax rules. fis xery

highleyellanguage

e Yer piogAmmertiendlu DExpressivelanguge Picthon's expressiveneSS means

Itiamore

capable

o

expressinghecOdes

puposehan

many ther

languages RedSon beingdewerlines

sCode and siaple

Suntax.

terprdted language

Pthou isaniherprettesdlangugeandnot acampiled

elassmate

Date

Page

Gnguae his means hat Puthon

installation
interprek
and

executes

theccde

line
la

lineo

a

ine

Ihus,iH

aakes

easier

o

debuq.

A s

completeness

when

aUser

installsPthen uou

ge all

Hhe

Aestures

Nithinwhich

uR

USeY

eds to

workhe

Usendoes

not

need

lo

Ăźnistallorldovwnload
othRr

packages ar

ibsarieswidhi

haandlatoru n

hRr

pĂ­ogromaing

longuages.Al

Aypesoh

requirédHunchonaluu

is

availaale

hraugvariaus madules

ot

Pthon

Stancdosd

5Cross

plodhormlonguage

PLahea

Conrun

equally we

on

ysiehy

ct

pladkor

mS

Ake

windows,

Linus,Upik, MacOSxi,

Super

Campuiers

Smasd

phones etc

Pon

is

odsĂłe

crossplator.m
language

or

R

can

Sau Hso

drue

postable

language.

ree

and

pen

Sour ce

Pthan

longuge

eel

vailalale

language

user

can

donlod

iAo

wwwpuaon orq

Eis

not

only ree

bu

olsoHs

SoDLCe cocle

iovailalkle

thati Ăźt, s

open SOurce_also.

)NGrietuot

USage or

pplicodions

Pthan

hos

evclved

tntoo

power

hul,fonmple e

and

ueo

anquageCerAheueors Ond

how

puthon

is

eingused

inmany

diverse

ields,

like

scriping

web

applicaion,A&mesdevelopnaent
rapid

prototuping

GU

OFOgrGmae

dadabase

applicadionahd

sustem

elasSMAte

Date

Page

Working

In

Pudhon

heredre

mulkiplePahonclistibution

avalalble,some

o

them

are

delaltinstalladionavailableAsom

awwpythonOg

which is

alsocalled

as C Pthon

som

installation

CndconesrfihPhandespretes,

Ptkan

ideall

nd

P1P.

Anaconda Pythoa

Distrsbution

a

Eisone o Ahe highlyTecommendeddishribuionuat

ComSpreloadedwithhAcan packacesand library

NuPuy PĂĄndas)

Cther de'sorealso awailalble_like Spder, Putcharm_et

Ontetheuser hasinstalledPthonon theconputer

Systemhe userisKeacdy to work onitIhevĆĄer

ConuorkiniPthanin OnectheAallowingwa

ateractiveaade Calsocalledas Immediatemade

Scipt mede

OWorkinginnterachvemodeai

lnteractivewucale
olaworkingmtanWhenUserpes

aComicno(enecoimanal.at.Ă€Hme )Ahen Puthan

xecuteshe-give.Camyaino

thenand
thereancd give

he

output

n

inleractieadeHhe

Usencon fe

thai

comnands

dler

thieedesoxs

Pthen prospt

n

Python

ISceipt

Mode

aiafa

Workin

2lorkigin

Pthouuin

Scriph Model

A inleractive

made itis

very uch

uselulAor Hestng -he

classmate

Date

Page

codes Once

aUsertypes

a

tommanodne b one the-

executicnisdane in AheSame ordercitherthe resutt.

dis

playcd or

coMMands
writtenby
the

user Can e

Saved pman

en1ly

LslichisnctpossibleinAnderachive_o

she

mode.lheuser

CC display

aswell.
asi-print

Nolues

in

interactivemo.dle

but

iox

serlphmade

prin statémend isprekerabblyUscd

o prin

the resuthe

scrip baode canbe usec in

Gnerormessage

la

scciptmoce

he

aHerentNertions

otPythen likePtho GUI 9

Working ln

AncicondaDistributiocn

Anaconda comes withmany preloadedibrariesand packages

and

bcth

indercctivend seriptmodes can

oeused.

Ano.conda Distikhutionalloisdollowiugtools

hata

ure

can

use to workiilupon

a

edupter Natebcoh is-aweb:basediteractive_couputi

J

environment

iSpuderisapowerhlPthan

DLEwrth man

usehlL

debuaaingdeadures

editing

interactise

tRStingund

Wrting and CompilingPthenProaraumeuth

Comhmanal

Line

Wride

he prog.anme

code intext

editorllall

2SauetheprogrammewihpuextenSion

9Compile and run onthe commanc prempt.-

namezrw

input

CEnter

Name)

print welcomeHo the

world

ot thon,nane