Data Science-Lab Manual
Data Science-Lab Manual
LAB WORKBOOK
18CS3211 DATA SCIENCE
13
18CS3211 DATA SCIENCE
LABORATORY WORKBOOK
STUDENT NAME
REG. NO
YEAR
SEMESTER
SECTION
FACULTY
13
18CS3211 DATA SCIENCE
The laboratory framework includes a creative element but shifts the time-intensive
aspects outside of the Two-Hour closed laboratory period. Within this structure, each
laboratory includes three parts: Prelab, In-lab, and Post-lab.
a. Pre-Lab
The Prelab exercise is a homework assignment that links the lecture with the laboratory
period - typically takes 2 hours to complete. The goal is to synthesize the information they
learn in lecture with material from their textbook to produce a working piece of software.
Prelab Students attending a two-hour closed laboratory are expected to make a good-
faith effort to complete the Prelab exercise before coming to the lab. Their work need not
be perfect, but their effort must be real (roughly 80 percent correct).
b. In-Lab
The In-lab section takes place during the actual laboratory period. The First hour of the
laboratory period can be used to resolve any problems the students might have
experienced in completing the Prelab exercises. The intent is to give constructive
feedback so that students leave the lab with working Prelab software - a significant
accomplishment on their part. During the second hour, students complete the In-lab
exercise to reinforce the concepts learned in the Prelab. Students leave the lab having
received feedback on their Prelab and In-lab work.
c. Post-Lab
The last phase of each laboratory is a homework assignment that is done following the
laboratory period. In the Post-lab, students analyse the efficiency or utility of a given system
call. Each Post-lab exercise should take roughly 120 minutes to complete.
13
18CS3211 DATA SCIENCE
In-Lab
Pre- Post- Viva Total Faculty
S. Lab Lab Voce (50M) Signatur
No. Date Experiment Name (5M) Logi Executi Result Analys (5M) (5M) e
c on (10M) is
(10M (10M) (5M)
)
1.
2.
3.
4.
5.
6.
7.
8.
13
18CS3211 DATA SCIENCE
In-Lab
Pre- Post- Viva Total Faculty
S. Lab Lab Voce (50M) Signatur
No. Date Experiment Name (5M) Logi Executi Result Analys (5M) (5M) e
c on (10M) is
(10M (10M) (5M)
)
9.
10.
11.
12.
13.
14.
15.
13
18CS3211 DATA SCIENCE
13
18CS3211 DATA SCIENCE
Prerequisite:
Python Basics
LAB SESSION 1
Pre lab:
1) Write the description and function prototype for the given Python in-built, Tuple,
List, Dictionary and Set functions.
Function Description
main()
print()
input()
vars()
type()
super()
set()
13
18CS3211 DATA SCIENCE
property()
range()
map()
isinstance()
issubclass()
exec()
eval()
compile()
abs()
encode()
join()
13
18CS3211 DATA SCIENCE
append()
extend()
remove()
union()
seek()
tell()
bin()
b) List
c) Dictionary
13
18CS3211 DATA SCIENCE
d) Set
e) Strings
13
18CS3211 DATA SCIENCE
Inlab:
1) Write Python program;
a) To enter the elements – ‘v’,’l’,’a’,’f’,’e’,’a’,’e’ into a list .
b) To printthe even indexed in the above list.
c) To swap the 1st and 3rd elements in the above list.
d) To print the frequency of elements in the list.
e) To print the elements which are repeated at least twice.
f) To convert the above list into a dictionary.
g) To print the elements in alphabetical order.
13
18CS3211 DATA SCIENCE
2) Write a Python program to print the Nth word in the given string by using ‘for loop’
and a keyword ‘break’.(Initialise N as 2)
Strings:
Which witch is a which?
Twelve twins twirled twelve twigs.
A happy hippo hopped and hiccupped.
13
18CS3211 DATA SCIENCE
Post lab:
13
18CS3211 DATA SCIENCE
2) Ashritha wants to find the count of Strong numbers that lie in the given range and
the Strong numbers that lie between 10 and 300 . Write a Python program to print
the Strong numbers in the given range and the count of Strong numbers. (NB: A
strong number is a special number whose sum of factorial of digits is equal to the original number. For
example: 145 is strong number. Since, 1! + 4! + 5! =145)
13
18CS3211 DATA SCIENCE
13