0% found this document useful (0 votes)
60 views2 pages

Assignment 6

Uploaded by

soumilieducation
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)
60 views2 pages

Assignment 6

Uploaded by

soumilieducation
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

Institute of Engineering and Management, New Town Campus

University of Engineering and Management, Kolkata


Assignment-6, First/Second Semester-2025
Course Name: Introduction to AI and Data Science using Python
Laboratory
Course Code: ESCCS192/ESCCS292

1 Write a program to Insert and Delete elements from list based on a given
position.
2 Find out Mean, Median and Mode of a list of numbers.
3 Sort a list of numbers without using a user defined function.
4 Use a dictionary to count the frequency of words in a string input by the
user.
5 Given a list of numbers return the indices in which a specific number
occurs.
6 Find and display the largest number of a list without using built-in
function max().
7 Write a program that accepts a list from user and print the alternate
element of list.
8 Write a program to create a text file as per the path and filename provided
by the user and add text as input by the user.
9 Write a program to copy the content of a text file to another file but while
copying convert all capital letters to small letters.
10 Create a text file to append N lines such that each line displays the
Fibonacci sequence upto the term corresponding to specific line number
separated by ‘-’. For N = 5 the text file should read.

1-1

1-1-2

1-1-2-3

1-1-2-3-5
11 Take input four values from user with respect to number of books, pens,
bags and total price as follows. 36, 116, 23, 4649 and save it as a text file
Books: 36

Pens: 116

Bags : 23

Price : Rs. 4649


12 Write a program to create a dictionary by reading records from the text
file output in program 4th

Dictionary : {“Books”:36, “Pens”: 116, “Bags”:23, “Price”: “4649”}


13 Write a program to take inputs from user to create a dictionary for storing
and displaying student data.
14 Write a program to read 6 numbers and create a dictionary having keys
EVEN and ODD. Dictionary's value should be stored in list. Your
dictionary should be like: {'EVEN':[8,10,64], 'ODD':[1,5,9]}.
15 Write a program that reads string from user. Your program should create a
dictionary having key as word length and value is count of words of that
length. For example, if user enters 'A fat cat is on the mat'.

Word Word length


A 1
fat 3
cat 3
is 2
on 2
the 3
mat 3

You might also like