15th Practical (DSP) - 1
15th Practical (DSP) - 1
Python (3 13306)
PracticalNo. 14, 15 a) Develop Python program to
packages for creating, accessingdemonstrate use of NumPy
and performing
different array operations.
b) Write a programto create user defined packages in
Python.
I.
Practical Significance
Though Python is simple to learn language but it
mentioned earlier Python supports various built in also very strong with its features. As
User can also make their own packages i.e. User packages. Apart from built-inpackage
purpose array-processing package. It provides a Defined Packages. Numpy is a general
object, and high-performance multidimensional array
tools for working with these arrays. This
code. practical wili allow students to write a
II.
Relevant Program Outeomes (POs)
Basic and Discipline specific knowledge: Apply
mathematics, science and engineering fundamentalsknowledge of basic
and engineering
specialization to solve the engineering problems
Engineering Tools, Experimentation and Testing: Apply
tcols and appropriate technique to conduct standard tests and modern engineering
Lif-long learning: Ability to analyze individual needs andmeasurements.
engage in updating
in the context of technological changes.
III. Competency and PracticalSkills
Develop general purpose programming using Python to solve problem.
The practical is expected to develop the following skills:
" Write a Python Program to create built-in package
" Writea Python Progran to create user defined package
IV. Relevant Course Outcome(s)
CO4- Design classes for given problemn.
V. PracticalOutcome (PrOs)
Built-in packages (e.g. NumPy, Pandas, Matplotlib)
User defined package
VI. Relevant Affective Domain related Outcome(s)
1. Follow safety practices
2. Demonstrate working as a leader /ateam member.
3. Follow ethical practices
Sr.
Remarks
No.
Name of Resource Specification Quantity (1f any)
Computer (i3-i5 preferable
Computer System RAM-2GB)
As per For ALIL
2 Operating System Windows/Linux
Batch Size Experiments
3. Development PythonIDE
Software
Computer System
2., Operating System
3 Development
Software
Note: Below given are few sample questions for veference. Teachers must design
more such questions toensure the achievement of identified CO.
1. Describe Numpy Array
2 Why should we use Numpy rather than Matlab. Octave or Yorick?
(Space for answers)
DAns.&.
.Numpy.0x304. S..a..multidime nsional...axoay
.NUmp..Suppoxts.on..CaCoting.ax30y.and
...opesation..on..axXay
.I.E..supp.0.xt... 39e...nitaices....nulti..
.dimensiona..ax 30y.
e..It...consist.. f..inbuild...na thematical..
function. ke...ine.ax...o.pexa.tion..aexies
txansfoxm..k..3andom.. pumbex..capability
Ex.3.One...dimensional...axay.Cl.2i3.4.1
Tuo..dimensional..aRay ..CCI2.,3]..[4S,6])
haee dimen Sional..a0y.=LC CL,2,33, (4,5.6]l)
Education 83
Maharashtra State Board of Technical K-SCHEME
Page No.
Date:
2A0s 8
Note: Faculty mustensure that every group of students use different input value.
(Useblank space for ans wersor attach more pages if needed)
1. Write a Python program to create two matrices and perform addition, subtraction.
multiplication and division operation on matrix.
2. Write a Python program to concatenate two strings.
3. Write a NumPy program to generate six random integers between 10 and 30.
(Space for answers)
DANS
LMp0x.t..0Umpy..aS.np. ...
A..Ap.axxay.(.C.C1,23, C3,4D).
Bnp..ax say.LC Csi6J., [2,8))
.C.a.np.add. CA.B)...
paint.C"Addition.of.tu.mataices.",C).
d...n.SQhtxa(t.(a. B).
p.xint.C.l:.subtaaction...of.tw...maticcs..d).
e.F.Dp.do.t.CA,B).
pxin.t..( Multiplication....f.tuo..mati(es 3", e)...
f..op.divide (A,B).
paint.L.DixiSiOn..of£..twO.mataices.fJ.
2).Ans .
imp0xt..AumpyaS.p..
A.F.np.axxa4.(.CC.I, 20...C3.4)).
.B..np..a32ay.(CCs,s].,.C7.433).
.C..np..Ca.n.CatcDa.t.c.CCA,B.)..axis.so).
d.Ap.con ca tcnate (CA,B)axiS.)
paint CcJ.
pxintld.).
K-SCHEME
Maharashtra State Board ot Technical Education
Page i .
)Ans &
Impoxt numpy
aznpXandom.xandint C10,316)
pzint (" Six sandom inteqexs betucen 1o.