0% found this document useful (0 votes)
21 views

5th Sem Programming Practical

Uploaded by

palashsetua
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

5th Sem Programming Practical

Uploaded by

palashsetua
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

xpt.No. Page No.

/
Spp4 Date./31 713

regaza g phsieet conist aptseti in lakredoy


Step >i A_perSon_must ubdesfona What_to da,ho to do -
_and eleay_pathuy_of tha precesspy bhich uark
cleer
i be done

path
Alonchat dagram.
hay
R_produce to tha
Sep3e Onee thuHlourchat be Contrhcteo
Ok
achive
ar Cods to fo
W Hing to Smpta progzramme
Pm
perpose2.
COss ave elarified
ThL aboue_poit_
wih gallauorma exanple.. s_
Going tp 2atche mavio ith tirlfuicmd
_Cn einama hall.
presentes

by

ORD

Teacher's Signature.
Maoming 0 SymboB o he follot) Chaf
Start and end

Com utational Step


Comp

0r Ont pnt tns tuchon.


Tn pht
beaking.
ecision
making and
orakir8

paro
tuo
CennectoY OY Jotnigg o&
pro Y A m n a
Expt.No. Page No./ 2
Date./
Start

Go toyaur glalkrends house

isshe in hauey

ras No
Tako hare her to the th2ater

See tho mo yBe

See hey bacK tO A2r hous_|

IComoback hame

SiopD

OXroRD

Teacher's Signature. .
basic (onguage Some p0qramu Yelated
Expt.No. Page No. 3
| to physial Chemisty epertment
Date./7.8.19
Rem* 6ptical danstty and molay extention co- e3hiaiant trom
absapim data**
Kem CalcatatOn ok Oplical okmsity kron a bsban c e adate
Declore sulo maln
Main

Sulo main

Dim dodouble Ta lee,In, D, OD,s ay, co ff s


Inpht NAho mumtr ok Obsgryation"s n.
InputEnter the cptoal path lerpthein dn unit i
S =0

Tnpw" Enter imrtenslty et micldet radia tion,Ta =1


Tnpht"Eater intensity ak transmmitea radiation 1, TA
Tapht Enter the Concentration.ok lizt absayvng Speciesj c
D=lCTa/T)
CD Dl2:303
SV= OD /C
S=S+ SV

Next
ay
frn "alculate Valueok parametay aphical densitp/
oxroRD Con centyationza y
Kem Calculate of_mo lar aafen atraslion co eAficent**
A

Co-ef a v / ! .
Teacher's Signature
Expt.No. Page No. 4
Date.

i't"Malar extention vatu of olute "3Co-eff

end Sub
Sleep
main.

oXrORD

Teacher's Signature
Expt.No. progamma Aye help Computer agdes
Page No./ S
xamina ton: Date./ 4 8 19
Sfart

Comphter maLLAJL 0na


Guastion

om puteY
S thewspos
CoTYect

Computer-
Connpute-
2ea ong we dlona Continue

Nert 9uastion

oXroRD

Teacher's Signature..
Number
oop Suming of N given

ShaTt+

/Reno N
p 3o
nitiahio and L0

/Rend A/

Aodad A on to s
Com putattow S S+A

Jinrea3e\ by|

tastina

write
Expt.No. Page No./
Date./29. 09 1

Stort
/ Reod onumbi

numeX
hegaHv

Snd sgraroot of thanumb

The last
humla

Pes

Yes

OXrORD

Teacher's Signature.
Expt.No. Page No. 7
Date./11 09 14
2 amme ~or Calesdation el eacirg vale enstant
eilhvv
ek chemical reac tHon gk eitt ist ar 22e deyi
he Kno that euaton tor Clcadahon ef vate cantod
Lof finst_oder eaction
K 303 lag ta-77-
hnd or BAnd ardey

k > Rake Constant ok eacHon


a initias Concentrahan
2 Concentraion_ok eackent_ak ony fime *

DeclTe .Suub moiN


Declore tirst Order
Declose Sulb Secomad Orer

Submain
Dim choice oka int2ger
pyintt: lafist Order"_
rnt " Second Oxdey
Inpatlhat _ts your Chotce " Chetce
oxroRD Lt Chotce lhen
Aistader

Teacher's Signature
Expt.No. Page No./ 8
Date.

Ese if_chnce = 2 then


Secomal Oder
Else
Man
En ifEnd Sub
Sulb rrst Order
els
Dim asdouble nchtsD, 6 k,T ie
Input" numboy ok oozsyation"6 n.
In p mitial Coneentrahian", ta.
Sc0.
For ? lton
Cmpnt "Enter_the fim onCoYreponding ConcentratHon
of reactant/Poaduct' et tand cf_
D=ie-Ct
Eteg tietD2E=2303 log (l)
K Ett
Sstk<
Net T2
S/N.
Pint'Bist drder yate lonStat Valu K=%k
Sleep

oXrORD Ma'n-
End Sw

Teacher's Signature
Expt.No. PageNo./ 9
Date./

Sub Seomd AxdeY


cls
Dim as double n, te,ctts.DE kil
Tnpwt NumbaY Ok obseryatHon z n2.
mpat "Tnihal Concen tzation"s te

Foy
npIatEntex tha time amd Corresponding ConemArotBon
ok ReoctantLpraluet tand C4
D t e -ct-

SS+k_
Nat T

P r t " Second order Yate_constanut Valu k R


Sleep-
main
End Suh.

oXrORD

Teacher's Signature.
t
Expt.No. Page No./ 70
Date./25.0-19
M r Operaton
MAL READ A- Read at aelement ek matrux A
YO-hSAarom_DATA SHafes ment

MATTNPUT A Call foy the nptINPUT of yaluetnto tAe


nmatr'x trom Key boro (zon-wiie)

MAT PRINT A= Prnt all element roul-hiLe insepaYete lizee

MATAsZT0_ Set all elemen- RA to egual to 2ero

MATA CON Set adl element of Ato 0e..

MATA lON- Set all diagonal elemantt and ethar tod


2ro CA must_be Stuer matix).

MATX =r Set x e9uat to yelenmOnk by elemant


(Xand y Showld be eE Sama Si22)._

gmd
MATCEA+D = Add A oma_b elemertky elemen
a s siagnthesa Yalu to (The size ok ABon
Must_ loe Semu)

MFTC A- S u b tracts b fromAelement by ele mnt-


si22of Abe
OXrORD and assiagn these Valu ta CThu
heudd be Same)

Teacher's Signature.
Expt.No. PageNo./
Date.

MATEK*A=_Multiples the matr%_eachelement by k


WuCh ught be numene constamt oryoyiables

MATD 1RNCA)-Set D e2ua_fo the transpase o A.

MATD /NYCA) -Set b 2qual to ths Cnverse ak A

Hondeclare matries apa nphtdata In_matzix=


Can.sidermg thu öllbhzing e2amplu
DimA =l313). BeCAz2
MAT READ A
DAtA L 2 2, S67, 8, 1 6 ,112,13
End
he elemLnt ok A and Yoad ya by roWd sHeo
asfollow

3
A 12113
789|

Hoo to ent matrga


Command for matrix prínt_
MA PKINT Zmdyix_nama
HleCommenkmatrtx YeSutwih ba átellgns
OxrORD
MAT PRINT A
A L2 3]
Teacher's Signature . .
Expt.o. PageNo. 12

Date./1}u/19
MATRIX ADDITIONANR ULEIRact1O
Matrix adol tion and sibstrachíon_Can bepertormed using
MATmatrixi- matrix- +matrix-3
Thesiee ef all the hethree matrix shauld be Same.
Exampl a
MATX E AtD.
MATY= A-Y
MATA A+C
Th LepaOperahan o additfon or asubtracton_cs Ga CAYYed
Out le ment by ekment
xC1J) = A CII)+B(ID
FoY all Yalu of T ndJ Simulataneously the SubotyacHon
state met
y ACLI)-D(J)
FoY all Valu o{ 1 and 1
DIMX (3 ),¥ z (3,3), M3,3 N(3,3)
MATREAD XY_
MAT M:X+Yr
MATN 2X-Y-
MAT PRINT MN
DATA ,8,7,6,SS Y321) 2, 3,4,S 6, H8,

OXroRD

Teacher's Signature *****


Expt.No. Page No./3
Date./

fuis pr0gTaMmi Tead data cn to matvX X Ond Y

X
3 2 8
Theaddikion amd SubstractBon ak x ond Y aYe ContMEd
ont tha YelAant and tke vesukant matuk MandN ore
ted ao ollovos
MadreM

Matrex N
8 64
O2
y-b-8

the prnt Corral ond ontpt


¢ormaÁe.

OXrORD

Teacher's Signaturek
E x p t . N o .
Page No./ 14
Date./3 1. 19J

Maxix Multiplicai 2
Mullipliaation ok talo matnx_Can bedone using tha MAt
Command in_tollowlng_form
MAT matrix-1_E momix-2 *_matytx-3

Dn nmportomt_rnle 's thot thL Mumb


of Colum ln_matrix nama -2 Shoud ke qhal to thenum bey
At Yo (n_matyix_Name 3 WhinComputer enCauter aSfoteym
an ike-
MAT A* AD

Campterproduce matie of Si2e mxn using Standard vule


ok matix be mudipliowHon (K,J
cCT3) = (,R

The Sama esudt Can he acheveve


by uing leops and LET statomen
ab ollos
FOR 2 to M.
to R
F O R J =I
LET C T J ) =O
For k=l ToN
*D CK,J)
LET Ct) = e CT,J)+ eACD, *)
OXrORD NEXT R
NEXT KJ
NEXT J
Teacher's Signature .
E x p t . N o
Page No. 15
Date.

NEXT
Tt s mporterat to mota fhovt stata man

MATC AX
MAT b* A .

Exauple
A Connpany_produce_Is typas of product and
Ptproduction for mant ecoved oo tolo
yze o producr 2 3 s
Produet_produuced1507

Cost O_each
PYOduct S005615 5
Ta 1teprogramme MAT Commanad to Calchlate
th total Cost ok the product dproouced oureng th
month
RBM* - PRoDUCT ATRX, C-CoST MATRIx **
REM ** T-ToTALCOST MATRIX*
DIMTCLD PCL IS),c(IS).
MAT READ P
MAT REA)E_
MAT T EPtC2
DXfORD DATA ISD, 13 21, 1.~3
OXFORD DATA 425 S00, 615-1AS
MAT PRINT T
Teacher's Signature
END
Expt.No.
Page No. 16
Date.22 ).19

Molar Yokune gk Yanse alaals go 1


e Can _wrtte Vander hhals equaHo olo
PA (NA)JCna(y-nb)-n RT =0
NdoW inding a yalu of y thod fits with given
Values o P ondT for a gien goh is tha poblem findizyay
thatmaKes the left-hand site ek euaHon euo EYO.,
T n amaYe_Siamdod matha mat Co relaHon WR CAN 1@
ighhond Side as e9uotton(D tCV), Tnan Whot wod is to
ind a v Such tha
. -

(V)0
T S d srt pyoblem ts ell Kn0wn fn math Tt LS
a20no
h problen es indin2 root_o eguoioY Tn
Yal Cose s(V) Could lo an\ Aumei. Tmtt Some few
CagesCtinieo eqiaHOn 9uad YAtic e9uotOY) om Cnalyie
Ccubtc,uartic
SolN Can ka obtoin eoaOy (y Ta otkr
nalytte solN orR Known, but thay oce obBoin
to
ness yo ule. Amd i mast Caßeo haYa tS Nohalyic
SoR od all
in scienee-
Thts sot lanes 2uP_Qutie oqulor y
Ln soh k a e h s a t h e usally Koep YOu zom sein
4kallyThis s
equn hut Com't ke Solrsenaly
studarmbafalse Y eo
Ano7tunate eecoto A(tgivss VIRw

OXrORD , lh
ht Wht tdan When_ydu_doCome up a9airota
Iytic SalY 2 Ans
tno theyoot PTO blem with no useFull_ano
NUm bgriCal
w blI LmbAYtcal OpPMOximaH On-
Teacher's Signature
Expt.No.
PageNo./ 17
Date.

app1oximaHon.sgives 22ang! dhot Canbe 2veTy bt a


alcudaAL_Co analylical Tesut 7h oY k_inyolyed in th
umb AA appYoximaton uSeallhy dLepend uApon ho muc
accurOLCy lalak Wanted Apd fhere re StonderRd DUM bereCaA
mathod.
hesoma oro ay to nd Yaot o c9uation Wab dave
lopes in thu mid oo's loy Dsaac NeWton.The modern'vgr-hon
wob deelpping developed oy Raph Son. 1ho tochinicque 1s
Knoid n as Noulton RaphSon Tt_Z003 UKs tis
Kt ba an app70xffion to aYot et t ) 20 tnen
a oetter approÅwohi.on is ren by
ily

hy a ) stonols Say ths deriyativL a f) 1fh vaspect

F rVender-haals e9uaton ) Cs qîven oy egatioy


O, 1tadexiyatan wftha r2het toa y is
3
'CV P -an y3-
and So the Newton - Raphion formula kax Vendar hlaals e) (I

OXrORD P V-nb)- nXT


V 1 V; -

20O
P
Teacher's Signature.
Expt.No.
Page No./ 18

Date./

Problem 2 What d fhe yofumme_e& ezactly ana male o


OXEgen_gO_a a pzaSsuYe of lo-oa otm andatem 0k
BanK 9 hr Axtgcn a isihasitato/maand biso.0031g14it/2ndl
TaKR to _be 0.0820TE At=atom /meslk-K
e Chortley ftmding Ya Ths "2ro heguess The idial palo la
glve nk1/P =2-uk ve_o votuma The OaI e Yodu VN
ektgng Aic Yalue into tha nunerahor of the Tatonin

DY0gyoam
cneluada Ksido>,fh
tinchude atnaKmadhh
dloat RTP, Oo i
Sloat f CHeat

return (P +(a/p(a,2))Lh-b) - k*1)

dloat df (Hloat a2
(a3)))
Ye turm C? - (a/powla2) )+ ((220*b)/paw

(nt main O_

OXFORD dloat Y2:46 hV, aleyr e o 600:


int i t , maxmtY

Teacher's Signature . . .
Expt.No. Page No. 19
Date./

prntCE»tey the Valu ok R,IP abi


ScontYd7, S%%{7f 2"4RK1AP, La,kh2
Pintt (Tn Ede tha yalu ef Vo and maxiamum ihacakianiNE
Scond C"%Ehd "KYD,kmaxmite
for et tY =I, ttPK =maxnni A tr )

Wfvo)/df (vo).
V-va- h)
if (talay(n)Kedke l eTY)

PYft fLAftey s inora hion ,Toot =} \nsitV)


Yeturn03

Print "ha zc9uuired sokution does not camverge interat=


on ore insuthictent \n)SI
2etck
Yeturnb

rORD"

Teacher's Signature

You might also like