ae on ee Nitros) LU EAG) +
Python Programming |
int main(){
i
Yeturn Oi
[ cnwy pga :
Display" Hello Wogid’ in (4 prog.
| ox, # indude instream > 2
I \slavi +t @nee = Sa
| _SwbeRE A prcblern i a_slate_of difFiculty that
fo} ___ feeds fo be vesolved =
(ee etepe Pa Prublem solving ease tf
i \OLdsntify 4h, Problem
[FP _I@ Understand te problem —
ip sae fy alternate ways t Jue the prabl
Hl i i Qidirity tne prob
ldentifiér info. Data re Pol Identifying tr problemi 5
i 5 xsblem. “Problem
+ [alaitso_ptagsamra to display yous name into th. |. | cw) ingony probe
| s @ Understand the-pxoblem:
1 r
= By using prink Pn. | Refore solving any
| ek, point C* yous nam) ik There axe Z atoecis ased an which the problem
ol Print is o fin which i ued to display nsg}_on sere } Con be underston d+ knowled qe
i a E | 2 Subject
T | -Communitati
il ay i i
7 The olternati to solve the problem m ut
i known do the deve
| [ ;
1 F b wnat n* tung
GY Select the bot way to sole the oreblem:
for sel Dest way + olve a problem’ the
r Seda
- mesitt: £ demerits of problem i taye analyze. The
oO | criteria jo eavaluate each problem must be
| ome define cl
—ff]
Suscesi-k Part enjoyed bie chaise college co ne
heed. 46evaluate. .
=2Re- evaluate + Pasth doe not find interest in the
= Wbject, Deut thange the rol
t_on nat
cbisfies tequinement PF customers |
@). Aigorithm is the cer obinsuckiens camied uk ib
| solvetne probtem. ‘
or_not.
i hich “lege to obtain & Fox solvii
his graduation . é } reach th sal.
I5-for ex» pxablem ct making a cup of an be
ILin decent College: and -branch. |_soluecl by oll. proceduse [ ence of actions
fox college and civaildiole iran ches. Considy 2S
‘ fi 2 4
Hone University. 4 by just fol) certuin actions
in. olving uch problems critical clecisions ha
ivenity indo id |_ to be mode: Sometimes, we need to follow the
. i i ‘conch proces of drial * evox.
MPardable fee.
er.of chepe are called heuristic: solution
For ex the problem of which Stock ehould 1 buy?
{ 1s. bared on heuristic solution. a4 it requiges
knowledge, expeiena of. trial # ecrar, chilli analysis
of market 4 so on
k@- Hostel Accomodation| Grady Search| Back tracking Branch &
Dynamic Programming Divide & Bound.
Conquer
iales
ees
| Warking back ward Fram the solution +
Geneval Pashlem saving strategies:
Divide £ Conguer: In thir strategy. whole Prablem
is divided into cub-| pxoblem th
Ww. t All salins Srom_all ub-
problem are collected to get
2inal solution
Dynamic Pragtamming:
7 Ta
| 49 pablem via sequential intermediate step,
4
———> Braking down system into sub-cudem
Requi
Overview of system is formulated
£ On
Decign
=} Breaking down modules into sub-modute
Iso known a¢-Step -wise gvsinementis
Coding
Mainainma
{Maintainence |- aml Adva_Enancing zyitum Sexvices asa Dew equine s
ments_are dis ttonered is -a.gain_maintainen. ct the
system. ES =
| Program Design tools:
2.Soft ware azthitechty se.
Z-Interphare reprecen tation
-2: enter value cf ‘o"
4 Blgazith mic Detni |
fep= Gi 8tnp!
Ditplay result
Floewchazt -
Pseudo code.
ky
Chaza —
Each algorithm moust have zera/on: inputa.
tee WP tie place out dha incizuctions 4 umanbigows
from. alge xithm then fas I cases the culg cribi d |
Ee oo = et a,
1 IEF Patygon
@|Nigoritm comist of simple statements #tonsre | r
| flow statements again sim ple. sb ican oe _
—@ Simple statements (omists & awignmint ctatemens | g
Beth yastertnsat f tana jlo Statement ¢£ commvnt statement. H -
Control -flaw statement A indicate Staring ct the count.
‘OE indicate: step by which Counter is incremented ox
@ 1f then el. Acoreménted.
B indicates ending value of bls ¢ounter _
Dnaw lowchast for add’o cf 2 no's
__. Gitar)
wf
aera Lb/
L
add=atb
L
Display odd [
L
sae [ Cerep )
1: Reprutnt i/p £ o/p in [ . :
Display a flow chart 4o calculete salary of
pringram
employes
sis Indicates decisiin
proces madi
ie how
Lentry £ onett
EE \ Dow. tlowchart for finding fibyanaccl serie.
| 24 Drow Plowchaxt tor sum ch elements in array,
Homework |
[ moter bacic aos 31 s(igtorts)
i I
\ Calculat Input
i HRA = baiic salazy* 0-10
| TA = batic solaayta-0 : tral 1
i Gross Salary= basic Salary+HRp 3s TA |
i toet = Gros salary * 0-0 i tl L Punt
Netsalavy= Gross saloay= tax. I
{ . I C= asb
| | a=b Ye
! Tira Hep TA, Gras salary | | bec.
tos Net salary cha cto +1
stoo ) as
5! 1 Na.
| i 2 arith i +
i (Start) [Sino [ tat)
j L 7
j : i Delare array
|! Tinout nat abe] Lae
sis T vat fe sput Num. n
| False True cate
J if | i
b7ce O>e I.
bum =
| Sums Orsay (un) Le z
! Lo dag ai
a | ler || _ Lend J =
fans iif student age >14
l print" adult"
I Jee
Ou
@_u
is High-level Prog-lang
portable lang
I “print "Not ap adult”
oe
I
C44, tay ython. Python _is_a_qeneral purpose prag> tang
in | Puthon is high-level 4 obj. oriented rag. lang __
tional Prog. 2 ol Python is used fo web-clevelopnunt . Appl. develop.
ations are performed deus Pns to values [ system administxa! , dave! ping gam
eu LISP. Haskell, Mi ol tis used in Al, Big Data ond Networking.
jLiterals| i
variable / constants.
@logit Prag: — | Numeric literal 6 Int
1! calculations ae dane th ma yeal_togic only} | Fnat
Tar ox. Prolag pavement [ > Complex: -
ex: ax integer liberal 19 __|
i [Hoot literal 15-16
G Jal 11-09. print (“complex literal”, c)
a feiin | Python Dota tpesss
+-Doto Types Tn. computer progcamming , datatypes
jee specify the typer of dota that can be
i_________gtored inside @ varfable.
| Mere, 24 (an integer) is_asiiqned to the num vananie,
So the datatye? ob num {ed the int case
| Python Data types: i
|
in’
|
chatacters :
List, tuple, range Holds collec'n of terns
Dick Holds data in
keyevalue pais fxm
Baal Holds either Tox
Hales coltecm of.
+ froveenset
print (" Pie" Pi).
j
x
Oi
vp. sis stoaed
‘dex calint. =10_
puuirt ("count=", count)
a ™tt tteate a “tuple
_ | product-= CU" Microsebt?, “xbox! "aga.a9)
ie a types
Within ti brackets
exo Languages = [ “swift” tava" “ Pythan’}
Be
print (productLo)) ge Microsoft
HE acces a flement_at index L
print (product £i]) # xbox
| Oukout
Microsoft
i
! (ist) Gstring values)
i
To access list items we use the index no. (0.1.2
eal)
‘bo:
>
84" "Java" "Python" |
Python String data types
ring: Shing is a sequence @ characters tepmecented by
# access clement at index O
either sin ye double quotes
)_# swift
ex:
name_=" Py then’
= Values
rint (name)
Eimesage= * Python for heginnen” ue
puint (mesa, gale ens
Out put: Pyth n
Python for_heginners
Python cd_data types| Compasiton operat
iMpoak
_ break except in
pa.
aie
erotors: (+. 2 * fi.
| ve CY Foot divicinnY |
@ Comparison operatir (ove < >,