NOTES - 20Sept24 - Introduction to Programming
NOTES - 20Sept24 - Introduction to Programming
So we need a to Cohmyicat,
we wan to CommyNcat eith ou
we cawt use itnguyes ake tind' or
phone,
-A We need
(c,Ctt, Java, Gthon, vauet
Cs BoL, Obechve -C, PH?, , fel, Rust, Go, Susilt, ksal,
Scala &tc.)
GmpaBe is basiall an elechone decice wkich undestenos
O, & s.
angynpute
And ue wat ou Aapplcompueallionydo onangy huk for
ttions of instruc
ons
fut Ohdto cahmkeexetue ke iil-nd poobony
some sothoes to solve
6conds. nt
But fust let stat wnith simple tesk.
add tuo nunbeus 1 74+ 65
Conmpdan od computes,
powe txtnted to praent
Scalhbi.ty- Aarh esily be Thia is becaune binay
Iago amount infon foen lepey wnrl
Canbe esily onbined to
4uch as
a ondvesal Rarye hat Can
canpudeu igadlex f
be ondoohod by all mgnafchue.
hew auchectup or
is foa (4auehy ) în Compua lap
Theue aue billio af tans dusitehes epregh th oleta and
when ombined Hese ono oley fesk & aloud hong.
instuchons for how to Complele
complek Conmpley
for humary ih
y to do some lesk in machne aode ade ln bhy
(in
Haidae aucheetuue
Not ted to
Compile. |Trteuprete ete.
C, ctt, Jve, Pyton JS
Moe Readable maintei ble
Cou platfam Gmphbil
homeng to Comnuycge uoth
So alos
would
Evefhi 41
nombeO,1,2,2-)
Os
into
canveed --
A,s,C.
) -) Hootta)k
q C, 0
4I.
.
<oithcompueu?
be i t (a,b,
decteu
shether
chacte
speeral
a
qny
Homen olo|lov6
ask) Irnstuch n loo00|...
TBut compdea
Bhept bdn
se can
A
Commynao
Dyedl t e irt hl a coimpute an exerte. It provdee
Ciete m to
Cimpade.
Jasks,npulite dt &intesct eidh kudse.
HLL (B C+t, lythn, Java)- e kse to homan
Rike
ahe chap egehblea, bol ont, foya.
maty dlogh ( wtiy speußt pats he
she mese out folleo step
by stey instosynta) do cuenk
these luhes
Algortn
definhon) qn
heal te Tea
example
(Reuipc)
skp1: stat
Sep>- Joun ete Imto a goucepan
Lugn the g4 on qhd pd gouepan o
TuÇn
step Ccudeto ma ) & boil. t
ad Spices ( he,
stpy:- Add
Adel ea leca ves tea powde to bol1y coe
steps..
minutes
Step 6) let it bosl fr abod 1-2
Step t- fouy mtlle to. he saucepan
He miatae to Lol agn ehg
deesnt ovefla Shr fr |- mte
Add Sugeu fo tte R
Stpt: 3 mnytey an low
fet it boil fr qboud
stplei. fame
o seiney into tups to
fes ttag
stepl: oun the feg
demove eaves & pres
Beyve hot
Hlyonthm hot opeufe to Csmpute sUence, whenu
chous n4 algoathrn
khon
-’hen You aue actully pefng heje steps to mad
Ansthe fx ample
SUm Q humbey
Sepl Shat
Shep2 Wahotat Derlaue auables non-,hom2 and Sorm
Skp3:. Teke fust inpud in
Take second put in nUm2
-Steps: CGleulik Sum by qddiy nom| & num2 4hd
SIqn Hhe esult to rug ble sum
So m hunm tnm 2.
Som
stp7.
wlat is Paeucoca de P
Rseudocode
oynbiaton o plan enyh Raye ad ad Prgammu cornsud
bndge between the alenthm qnd
and atal
Pqumny Code.
|Algenthm
Pseudocode
BEGIN
f nomb es
READ 'nom' &'hum 2
CompuTE Sum
Sum - num t hom2.
PRIpNT 'Sum'
ND
moe
dtauchued than Plein erlyh bud les fetnal
Emmple2:- Cheek huhbe y even or odl.
READ
PRINT even
fRINI odl
wHIL DO REPEAT
fRINT num
fRINT num
num hom +I
num = nomt
UNTI L num l0
eND WJHILE
END
(peatlehgom)
Pooces
-
loslhes:
Gonnecor (stnall ctle) Connect
Connector)
usedl to connec clfeed put a fasthat
espeenlly cohen t purs mlhple p
bea-b
p
Ans a circle.
Alyoith Sepi inefen
perlae yausbleferaadlis a) aea and
stepy: aloy He fot ml
Stepf. Caltalak Czcoma
Cintumfea tnce by osig the formta
Crtumfuence
stepsi Dupy val4e o ares and corcomfeence.
Stept St
Plohaut Sh)
seudhcode:
Dec aue vauy ble ,
Read e uea, citemfeene
SeT pT =3-14
CompuTE uea Set Pr =344
PRINI
Ues /Red
fRINT Greo mferene
END, C)stomfeuehce=
Pont aueg
ircumferene
Slut
SBopl: Declae q vauable hum
stp'e: Take inpd wsng tte
completedy dvable hy 2
Step: Check i? hum is
hum 2 then (ont
nombe s odd
Otheye pnn nombe
Steps:
fbuchat:
Pseudocode!
READ nom
IF nm = 0 the
PRINT even Check No
nem ==0
PRINT dd
SND 1F
END krt nrm hum
Step