Gujarat Technological UniversitySummer 2024 Examination

GTU 3150713 Python for Data Science Summer 2024 Paper Solution & PDF

B.E. · Computer Engineering · Semester 5 · Subject Code: 3150713
Download Official GTU PDF
Share:
Total Marks70 MarksExternal theory exam
Passing Marks23 Marks33% minimum cutoff
Exam Duration2.5 Hours2:30 PM – 5:00 PM
Paper Structure5 QuestionsWith internal OR choices
Jump toQ1Q2Q3Q4Q5

Question 1

14 MarksMedium
(a)
Briefly discuss major coding styles supported by python programming language.
3 Marks
(b)

What will be the output of the below python code? import numpy as np a = np.array([[1, 2.5, 3],[4, 5, 6.5]]) print(a.shape) print(a.ndim) print(a.itemsize) print(a.nbytes)

4 Marks
(c)

Write a python program to take two strings and position value (starting from zero) as input from the user. Insert the second string in the first string after the given position. (Example: String-1 = "Gujarat University", String- 2="Technological ", position = 7, Output="07

7 Marks

Question 2

14 MarksMedium
(a)
Discuss characteristics of Set and Dictionary data structures in python.
3 Marks
(b)
Write a short note on TF-IDF transformations.
4 Marks
(c)
Explain different stages of the data science pipeline.
7 Marks
OR OPTION
(c)

Discuss major libraries available with python language with its application in the field of Data Science.

7 Marks

Question 3

14 MarksMedium
(a)
Explain different data structures available in pandas library.
3 Marks
(b)
Below is the content of a csv file named "data.csv".
Name,Salary
abc,10000
xyz,20000
pqr,40000
Write a python program to read data from given csv file and print each pair of
names and salaries in the format "Name -> Salary". (Example: abc -> 10000 and
so on)
4 Marks
(c)

Why it is important to find missing values from a dataset? Discuss different approaches to handle missing values with appropriate examples.

7 Marks
OR OPTION
(a)
Write a short note on categorical variables.
3 Marks
(b)

Consider below dataframe in python A B C 0 7 1 1 2 5 8 2 3 6 9

iWrite a code to sort this dataframe by column A.
iiWrite a code to sort this dataframe by row 0 (first row).
4 Marks
(c)

Explain the process of Word Tokenization, Stemming and Stop word removal using nltk library with suitable example code.

7 Marks

Question 4

14 MarksMedium
(a)
Discuss how to create pie chart using matplotlib library with suitable example.
3 Marks
(b)

Demonstrate how to remove a row and a column from a dataframe with appropriate example code.

4 Marks
(c)

Data of marks for five students in three subjects is as given below. Maths = [100, 82, 76, 51, 88] Physics = [92, 89, 81, 83, 80] Chemistry = [71, 90, 75, 88, 45] Write a python program to create boxplot from the above data. What type of important observation about data can be derived from the boxplot?

7 Marks
OR OPTION
(a)

Explain how to add markers and change line color and line style in a line graph using matplotlib library.

3 Marks
(b)

An adjacency matrix for a graph with for nodes named 0, 1, 2, 3 is given below. 0 1 2 3 0 0 1 1 0 1 0 0 0 0 2 0 1 0 1 3 1 0 0 0 Write a python program to draw the undirected graph from above matrix using networkx library.

4 Marks
(c)

Below is the data about average temperature (in °C) at a place for 15 days. temp = [30, 34, 35, 32, 38, 26, 29, 45, 42, 32, 40, 33, 36, 34, 36] Write a python program to create histogram with 4 bins from the above data. What type of important observation about data can be derived from the histogram?

7 Marks

Question 5

14 MarksMedium
(a)
What is the use of %timeit and %%timeit magic functions?
3 Marks
(b)
Discuss importance of covariance and correlation in EDA.
4 Marks
(c)

What is regression and classification problems? Explain any one with suitable example.

7 Marks
OR OPTION
(a)
Explain different interfaces from Scikit-learn library.
3 Marks
(b)
Explain the importance of chi-square test in EDA.
4 Marks
(c)
Write a note on different descriptive statistics measures for numeric data.
7 Marks
College Exam Groups

Studying for Python for Data Science?

Circulate this solved paper with KaTeX formulas and 1-click AI step solvers to your batchmates on WhatsApp or Telegram.

About this Examination Paper & Attribution

Official Gujarat Technological University (GTU) examination paper and step-by-step solutions for Python for Data Science (Summer 2024, B.E. · Computer Engineering, Sem 5). Features complete 70-mark regular & remedial examination pattern, official marking distribution across all 5 questions, and direct 1-click official PDF download.

Transcribed for student exam preparation from Gujarat Technological University official examination archives. Questions, syllabus guidelines, and curriculum marking schemes remain the intellectual property of Gujarat Technological University.

Download PDF