Docsity

Basic Python Programming Notes for Beginners, Cheat Sheet of Software Engineering

Toggle sidebar
bg1
Basic
PYTHON
Notes
hy
leayn
Puthon
Nhat
is
a
Python
Python
is
a
simee,
hign
level,
qenexal.
purpose
and
obËect
-
Oriented
PYOgraMMing
language
C
EGSy
to
use
Qnd
earn
Expresslve
anguage.
Intexpreted
language
|Object-Oyiented
1anquage.
Embeddable
AUL
UMAR
NoTES
4ALLErY
Dynamic
MemoYy
Allocatl
on
"Cqur
Programming
suppoxt.
where
is
Puthon
used?
clacstec
Dara
science
Dara
Mining
Desktop
Applicatons
Mobile
Applications.
web
Applications
Machine
learninag
3D
CAD
Applications
Speech
Recognitlons
Open
sOuYCe
|anguage
Extensible
pf3
pf4
pf5
pf8

Partial preview of the text

Download Basic Python Programming Notes for Beginners and more Cheat Sheet Software Engineering in PDF only on Docsity!

Basic PYTHON Notes

hy leayn Puthon

Nhat is a

Python

Python is a simee, hign level, qenexal.

purpose and obËect - Oriented PYOgraMMing

language

C

EGSy to use Qnd earn

Expresslve anguage.

Intexpreted

language

|Object-Oyiented 1anquage.

Embeddable

AUL UMAR

NoTES 4ALLErY

Dynamic MemoYy Allocatlon

"Cqur Programming suppoxt.

where is Puthon used?

clacstec

Dara science

Dara Mining

Desktop Applicatons

Mobile Applications.

web Applications

Machine learninag

3D CAD Applications

SpeechRecognitlons

Open sOuYCe |anguage

Extensible

NOTE

:

hexe /s no

use Of

Cusly braCes ox

Semicolon in python

prog7aMmin

g

|anguage.

Rathon tYst Program

KograM for Print Heilo norld

Print"Hello aNorld"

Dcie

Puthon PopulaY rameworKS and ibYaries

AUL MR LUNKEPN).

NOTES GALERY TeLE;EAM).

|eb Development : D Janao f1ask_ lyYamid

Chersy Py.

GUIS based Applications : TK, PyGTK, PyQT,

PyTS.

Machine |easning : Tensorfow yToYch

Py

Scikit- learn etc.

Puithon axiables.

Mathematics : Numpy

hold alue:

Python Variable is a nane that is used to

refer toD MeMory 10carion. Pytnon vaxiable

Nympy pandgS etc.

is alsO Knon as

identiCiex and used to

The for loops

The syntax of Fox lo0p:

or

iteyating

var

in

sequence

St tement (S)

A Fox l0op is used foY iterating over a

Sequence. It is fyequently used to traverse

the data structures like ist_ , tuple or

dictiongry

Example i

Outpyr:

Exgmele:

S+Y= Vedant

foY i in stx:

Print(i)

age

a

else:

classMate

t

Date

Page

aqe int(input("Enter your Age"))

AUL eMR LINKEDIN).

NorES GALLeRY(TELE4RAM).

print("you qre eligible to vote")

print("yos are No eligible to vote"

The elif stQtement

Suntax

TE ConditlonS:

Ihe eli stateMent aye used to check Multiple

Conditions and executes the specific block

OF statements dependin upon the tue

Condition aMOng them.

classMAte

else

Date

block of Statements

eif condition :

Rython function

Page

*blocK of Starements

elif conditBon 3:

blocK of Statemens

elif condition 4i

Cyeating function.

ATuL KMALUNKGDIN).

NOTES YMLERY (TeLRAM)

below

blocK of Sratements

Pathon function axe the Most iMpoxtant

aspect of an application. A Function can be

setined as the oxagnized blocK of

xeusable code, mhich can be caled

Jnhen evey required

Python provides the def Keyword to define

the function. The syntax of the de Cine

Funcion is GiVen

Date

tyom aXYay íMpoxt*

q

=arx.axYay('i,C2,4,6.

iMportavYayas

arr

print("yst

ExqMple

ATUL

FiYstelement

:

Second

element

: 4

2

Qurpur

Python

Sring

Python

Stringis

Syntaxi

Sty = Hi

( vedant

String

indexing

eleMent:"ato)

print("Second

element:"aLI])

KUMAR

LINKEPIN).

the

collectionofthe

charactexs

suxounded

by single quotes,

double quores ox triple quotes

clhssmta.

Date

AruL

IMALUNKEPIN).

Str=

Hello".

Examplei

E

L

Print(sty

Lo])

Print(StyL1])

Pslnt(&t

[2])

Print(Sty

[3])

Print(Sty

[4])

Print

(&th

[5])

StinaOperators

t 0 Concatengte

the two string

E J’OAccess the sub-Stzings Ofa

2atticulay

string

Tt is used to pexfoM Sting

Poxmatting

Oubeut:

enteyO

number

= 55

Sum is[0.