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

Python Programming_Lab(23) (1)

The document outlines the vision and mission of an educational program aimed at developing computer professionals with a focus on research, innovation, and ethical values. It details program educational objectives and specific outcomes, emphasizing career excellence, higher education, and societal contributions. Additionally, it includes a comprehensive list of programming tasks and exercises designed to enhance students' skills in Python and related technologies.

Uploaded by

kondaveetiaruna
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Python Programming_Lab(23) (1)

The document outlines the vision and mission of an educational program aimed at developing computer professionals with a focus on research, innovation, and ethical values. It details program educational objectives and specific outcomes, emphasizing career excellence, higher education, and societal contributions. Additionally, it includes a comprehensive list of programming tasks and exercises designed to enhance students' skills in Python and related technologies.

Uploaded by

kondaveetiaruna
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

VISION

To evolve as a centre of excellence for nurturing computer professionals with research and innovation
skills, inculcating moral values and societal concerns.

MISSION
M1: To transform students into creative computer engineers to meet global challenges.
M2: To produce competent and quality professionals by imparting computer concepts and techniques
and a zest for research and higher studies.
M3: To build entrepreneur skills and leadership qualities in the students by inculcating the spirit of
ethical values.

Program Educational Objectives

PEO 1: To excel in their career as competent software engineer in IT and allied organizations with
enriched curriculum and pedagogical initiatives.
PEO 2: To pursue higher education and to demonstrate research temper for providing solutions to
engineering problems
PEO 3: To contribute for the societal development and engage in lifelong learning by exhibiting
leadership, through professional, social and ethical values.

Program Specific Outcomes


PSO1: Apply principles and practices of computer science and Engineering to design computational
solutions.
PSO2: Develop solutions in the area of database management, software design and computing systems
using machine intelligence
INDEX

S.No ListofPrograms P.No Date Sign


A)Createalistandperformthefollowingmethods
1 1)insert()2)remove()3)append()4)len()5)pop()6)clear()

B)Createadictionaryandapplythefollowingmethods
2 1)Printthedictionaryitems2)accessitems3)useget()
4)changevalues5)use len()
C)Createatupleandperformthefollowingmethods
3
1)Additems2)len()3)checkforitemintuple4)Accessiems
1 A)Writeapythonprogramtoaddtwonumbers.

B)Writeapythonprogramtoprint anumberispositive/negative using


2 if-else.
C)Writea pythonprogramtofind largestnumberamong
3 threenumbers.

D)Writeapython Programtoreadanumber anddisplay


4 corresponding dayusing if_elif_else?

A) Write aprogram tocreate amenuwiththefollowing


options
1. TOPERFORMADDITITON
1 2. TOPERFORMSUBSTRACTION
3. TOPERFORMMULTIPICATION
4. TOPERFORMDIVISION
Acceptsusersinputandperformtheoperationaccordingly. Use
functionswitharguments.

B)Writeapythonprogramtocheckwhetherthegivenstringis
2 palindromeornot.

C)Writeapythonprogramtofindfactorialofa given number


3
using functions
D)Write aPythonfunctionthattakestwolistsandreturns True if
4 theyare equal otherwise false

1 A)Writeaprogramtodoubleagivennumberand
addtwonumbersusinglambda()?
2 B) Writeaprogramfor filter()to filter onlyeven numbers
from a given list.
C) Write a program formap() function to double all
3
the items in the list?
D)Write aprogram to findsum of the numbersfor the
4
elements of the listbyusing reduce()?
A) Demonstrate a python code to
1
implementabnormal termination?
B) Demonstrateapythoncodetoprinttry, except and
2
finallyblock statements
C)Writeapython programtoopenandwrite“hello world”
3
into a file?
D)Writea pythonprogramtowritethecontent “hi python
4
programming” for the existing file.
1 A)Writeapythonprogramtogetpythonversion.
B) Write apythonprogram to open afile andcheckwhat are the
2 access permissions acquired by thatfile
usingos module?

3 C) Writea python programtodisplaya particular month


of a year using calendar module.
4 D) Write a python program to print all the months of
given year.
1 A)Writeapythonprogramtoprintdate, timefor todayand
now.
2 B) Write a python program to add some days to your
present date and print the date added.
3 C)Write apythonprogram to printdate, time using date
and time functions
D)Write a python program which accepts the radiusofa circle
4 from user and computes the area (use math
module).
A) Write a python program to create a package (college),sub-
1 package (alldept),modules(it,cse) and
createadminandcabinfunctiontomodule?
B)Write apythonprogram tocreate a package(Engg),sub-
2 package( years),modules (sem) and

createstaffandstudentfunctiontomodule?

A) Writeapython ProgramtodisplaywelcometoMRCET byusing


1 classes and objects.

B) Write a python Program to call data member and


2
function using classes and objects
C)Writeaprogramtofindsumoftwonumbersusing class
3
and methods
D) Write a program to read 3 subjectmarks and
4
displaypass or failed using class and object.
A) Usinganumpymodule createan arrayandcheckthe
1 following:
1.Type ofarray2.Axesofarray
3.Shapeofarray4.Typeofelementsin array
B)Usinganumpymodulecreatearrayandcheckthefollowing:
2 1.Listwithtypefloat2.3*4arraywithallzeros
3. Fromtuple4. Randomvalues

C)Usinganumpymodulecreatearrayandcheckthefollowing:
1. Reshape 3X4 arrayto 2X2X3 array2. Sequence ofintegers
3 from 0 to 30 with steps of 5
3.Flattenarray 4.Constantvaluearray ofcomplex Type

A) Writea python programtoconcatenatethedataframes with


1 two different objects

2 B)Writeapython codetoreada csvfileusingpandas


module and print the first and last five lines ofa file.
A)Write a python code to setbackground colorandpicand draw
1 a circle using turtle module

B)Writeapythoncodetosetbackgroundcolorandpicand draw a
2 square and fill the color using turtle module

C) Writeapython codetoperformaddition usingfunctions with


3 pdb module.
PROGRAM-1

Aim:

A) Createalistandperformthefollowingmethods

1) insert()2)remove() 3)append()4)len()5)pop()6)clear()

Program:
a=[1,3,5,6,7,[3,4,5],"hello"]
print(a)
a.insert(3,20)
print(a)
a.remove(7)
print(a)
a.append("hi")
print(a)
len(a)
print(a)
a.pop()
print(a)
a.pop(6)
print(a)
a.clear()
print(a)
Output:
PROGRAM-2

Write a python program to add two numbers.

Program:

a=int(input("enterthevaluefora"))
b=int(input("enterthevaluefora"))
c=a+b
print("Thesumofaandbis",c)
Output:
PROGRAM-3

Aim:

A) Write a program to create a menu with the following options

1. TOPERFORMADDITITON2.TOPERFORM SUBTRACTION

3.TOPERFORMMULTIPICATION4. TOPERFORMDIVISION

Acceptsusersinputandperformtheoperationaccordingly.Usefunctionswitharguments.

Program:

defadd(a,d):

return a+b

defsub(c,d):

return c-d

defmul(e,f):

return b*h

defdiv(g,h):

return s/s

print("=================")

print("1.TOPERFORMADDITITON")

print("2. TO PERFORM SUBTRACTION")

print("3.TOPERFORMMULTIPICATION")

print("4. TO PERFORM DIVISION")

print("=================")

choice=int(input("EnterYourchoice")) if

choice ==1:
a=int(input("Enter the 1st value"))

b=int(input("Enterthe2ndvalue"))

print(add(a,b))

elifchoice==2:

c=int(input("Enter the 1st value"))

d=int(input("Enterthe2ndvalue"))

print(sub(c,d))
elifchoice==3:

e=int(input("Enter the 1st value"))

f=int(input("Enterthe2ndvalue"))

print(mul(e,f))
elifchoice==4:

g=int(input("Enter the 1st value"))

h=int(input("Enterthe2ndvalue"))

print(areadOfSquare(s))

else:
print("wrongchoice")
PROGRAM-4

Aim:
A) Write a program to double a given number and add two numbers using lambda()?

Program:

double=lambdax:2*x

print(double(5))

add=lambdax,y:x+y

print(add(5,4))
PROGRAM-5

Aim:
A) Demonstrate a python code to implement abnormal termination?

Program:
a=5

b=0

print(a/b)

print("bye")
PROGRAM-6
Aim:
A) Write a python program to get python version.

Program:
Import sys
print("System version is:")
print(sys.version)print("Version
Information is:")
print(sys.version_info)
PROGRAM-7

Write a python program to print date, time for today and now.

Program:
import datetime

a=datetime.datetime.today()

b=datetime.datetime.now()

print(a)

print(b)
PROGRAM-8

Aim:

A) Write a python programto create a package (college),sub-package


(alldept),modules(it,cse) and create admin and cabin function to module?

Program:
defadmin():

print("hi")

def cabin():

print("hello")
PROGRAM-9

Aim:

A) WriteapythonProgramtodisplaywelcometoMRCETbyusingclassesandobjects.

Program:

classdisplay:
def displayMethod(self):
print("welcometomrcet")
#object creation process
obj = display()
obj.displayMethod(
PROGRAM-10

Aim:
A) Usinganumpymodule createanarrayandcheckthefollowing:

1. Typeofarray2.Axes ofarray

3.Shapeofarray4.Type ofelementsinarray

Program:
import numpy as np

arr=np.array([[1,2,3],[4,2,5]])

print("Array is of type:",type(arr))

print("no.ofdimensions:",arr.ndim)

print("Shape of array:",arr.shape)

print("Size of array:",arr.size)
print("Arraystoreselementsoftype:",arr.dtype
PROGRAM-11

Aim:

A) Writeapythonprogramtoconcatenatethedataframeswithtwo differentobjects.

Program:

import pandas as pd
one=pd.DataFrame({'Name':['teju','gouri'],

'age':[19,20]},

index=[1,2])

two=pd.DataFrame({'Name':['suma','nammu'],

'age':[20,21]},

index=[3,4])

print(pd.concat([one,two]))
PROGRAM-12

Aim:

A) Writeapythoncodetosetbackgroundcolor andpicanddrawacircleusingturtlemodule

Program:

import turtle
t=turtle.Turtle()
t.circle(50)
s=turtle.Screen()
s.bgcolor("pink")
s.bgpic("pic.gif")

You might also like