Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
4 views

1 Python Front

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

1 Python Front

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

DEPARTMENT OF COMPUTER

APPLICATION TKM COLLEGE

OF ENGINEERING
KOLLAM – 691005

23MCAJ101 – PROGRAMMING IN PYTHON

PRACTICAL RECORD BOOK

First Semester

MCA 2023-2024

Submitted by:

NAME: SUBIN RAJ

REG NO: TKM23MCA-2319


DEPARTMENT OF COMPUTER
APPLICATION TKM COLLEGE OF
ENGINEERING

KOLLAM – 691005

Certificate

This is a bonafide record of the work done by SUBIN RAJ (TKM23MCA-


2319) in the First Semester in Programming in Python Course
(23MCAJ101) towards the partial fulfillment of the degree of Master of
Computer Applications during the academic year 2023-2024

Staff Member in-charge Examiner

………………………..

……………………….
SL NAME OF PROGRAMS PAGE
NO NO

CO1
1 Display future leap years from current year to a
final year entered by user.

2 List comprehensions

3 Count the occurrences of each word in a line of


text.

4 Prompt the user for a list of integers. For all


values greater than 100, store ‘over’ instead.

5 Store a list of first names. Count the


occurrences of ‘a’ within the list

6 Enter 2 lists of integers. Check (a) Whether list


are of same length (b) whether list sumsto same
value (c) whether any value occur in both
7 Get a string from an input string where all
occurrences of first character replaced with‘$’,
except first character.[eg: onion -> oni$n]
8 Create a string from given string where first and
last characters exchanged. [eg: python ->
nythop]
9 Accept the radius from user and find area of
circle.

10 Find biggest of 3 numbers entered.

11 Accept a file name from user and print


extension of that.
SL NAME OF PROGRAMS PAGE
NO NO

12 Create a list of colors from comma-separated


color names entered by user. Display first and
last colors.
13 Accept an integer n and compute n+nn+nnn.

14 Print out all colors from color-list1 not contained


in color-list2.

15 Create a single string separated with space


from two strings by swapping thecharacter at
position 1.
16 Sort dictionary in ascending and descending
order.

17 Merge two dictionaries.

18 Find gcd of 2 numbers

19 From a list of integers, create a list removing


even numbers.

20 Program to find the factorial of a number

21 Generate Fibonacci series of N terms

22 Find the sum of all items in a list


SL NAME OF PROGRAMS PAGE
NO NO

23 Generate a list of four digit numbers in a given


range with all their digits even and the number
is a perfect square.
24 Display the given pyramid with step number
accepted from user.

25 Count the number of characters (character


frequency) in a string

26 Add ‘ing’ at the end of a given string. If it


already ends with ‘ing’, then add ‘ly’

27 Accept a list of words and return length of


longest word.

28 Construct following pattern using nested loop

29 Generate all factors of a number.

30 Write lambda functions to find area of square,


rectangle and triangle.

SL NAME OF PROGRAMS PAGE


NO NO
CO2
1 Work with built-in packages

2 Create a package graphics with modules


rectangle, circle and sub-package 3Dgraphics
with modules cuboid and sphere. Include
methods to find area and perimeter of respective
figuresin each module. Write programs that finds
area and perimeter of figures by different
importingstatements. (Include selective import of
modules and import * statements)
3 Write a Python program to read a file line by line
and store it into a list

4 Write a Python program to copy odd lines of one


file to other

5 Write a Python program to read each row from a


given csv file and print a list of strings.

6 Write a Python program to read specific columns


of a given CSV file and print the contentof the
columns.
7 Write a Python program to write a Python
dictionary to a csv file. After writing the CSV file
read the CSV file and display the content.
8 Write a Python program to create DataFrame
from csv file and perform cleaning operations
like removing duplicates, managing empty data,
irrelevant colums, rows etc.
SL NAME OF PROGRAMS PAGE
NO NO
CO3
1 Create Rectangle class with attributes length
and breadth and methods to find area
andperimeter. Compare two Rectangle objects
by their area.
2 Create a Bank account with members account
number, name, type of account and balance.
Write constructor and methods to deposit at
the bank and withdraw an amount from the
bank.
3 Create a class Rectangle with private attributes
length and width. Overload ‘< operator to
compare the area of 2 rectangles
4 Create a class Time with private attributes
hour, minute and second. Overload ‘+’
operator tofind sum of 2 time.
5 Create a class Publisher (name). Derive class
Book from Publisher with attributes title and
author. Derive class Python from Book with
attributes price and no_of_pages. Write a
program that displays information about a
Python book. Use base class constructor
invocation andmethod overriding.
6 Demonstrate the use of Built in Exception
classes
7 Write a Python program to throw an exception
if the mark scored by the student is less than
50 and display the message ‘failed’.
8 Demonstrate the use of Assertions.
SL NAME OF PROGRAMS PAGE
NO NO
CO4
1 . Write a python program to check the validity
of password input by users. Validation (At
least 1 letter between [a-z] and 1 letter
between [A-Z]. At least 1 number between [0-
9]. At least 1 character from [$#@]. Minimum
length 6 characters. Maximum length 16
characters, must begin with capital letter[A-Z].
2
Create a student database with name, rollno
and total marks. Apply INSERT operation to
insert records. Display the details of students
with marks greater than 90%. Update the
marks of student with rollno 200(create the
record) and display the updated details
(MySQL)

SL NAME OF PROGRAMS PAGE


NO NO
CO5 PROJECT
1 . Write a python program to check the validity
of password input by users. Validation (At
least 1 letter between [a-z] and 1 letter
between [A-Z]. At least 1 number between [0-
9]. At least 1 character from [$#@]. Minimum
length 6 characters. Maximum length 16
characters, must begin with capital letter[A-Z].
2
Create a student database with name, rollno
and total marks. Apply INSERT operation to
insert records. Display the details of students
with marks greater than 90%. Update the
marks of student with rollno 200(create the
record) and display the updated details
(MySQL)

You might also like