Gujarat Technological UniversitySummer 2024 examination

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

B.E. · Computer Engineering · Semester 5 · Subject code 3150713
Download official PDFView PDF here
Share with your class
Total
70 marks
To pass
23 marks (33%)
Duration
2.5 Hours 2:30 PM – 5:00 PM
Questions
5 with internal choice
No solutions on this paper yetNeed them for your exam? Ask once. Papers that students ask for are solved first, and we aim to add them within 24 hours.

9 of 25 questions on this paper were also asked in other years. 2 more are types of question GTU sets again with new data. Each is marked below with the years it appeared.See all 37 repeated 3150713 questions, most asked first

Q.1

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

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)

(c)
7 marks

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

Q.2

14 Marks
(a)
3 marks
Discuss characteristics of Set and Dictionary data structures in python.
(b)
4 marksAsked in 3 of 7 papers
Write a short note on TF-IDF transformations.

Also asked in Winter 2025 Q3b OR, Summer 2025 Q4c OR

(c)
7 marksAsked in 5 of 7 papers
Explain different stages of the data science pipeline.

Also asked in Winter 2025 Q2c, Summer 2025 Q2c, Winter 2024 Q2b, Winter 2023 Q2b

(c)
7 marksAsked in 2 of 7 papers

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

Also asked in Winter 2025 Q2c OR

Q.3

14 Marks
(a)
3 marks
Explain different data structures available in pandas library.
(b)
4 marksSame type asked in 3 of 7 papers
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)

Also asked in Winter 2025 Q4b OR, Summer 2025 Q3b

(c)
7 marksAsked in 4 of 7 papers

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

Also asked in Winter 2025 Q3c OR, Summer 2025 Q3b OR, Winter 2024 Q5c OR

(a)
3 marksAsked in 3 of 7 papers
Write a short note on categorical variables.

Also asked in Summer 2025 Q3c, Winter 2023 Q5a OR

(b)
4 marks

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).
(c)
7 marks

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

Q.4

14 Marks
(a)
3 marksAsked in 3 of 7 papers
Discuss how to create pie chart using matplotlib library with suitable example.

Also asked in Summer 2025 Q4b, Winter 2024 Q4c OR

(b)
4 marks

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

(c)
7 marks

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?

(a)
3 marks

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

(b)
4 marksSame type asked in 2 of 7 papers

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.

Also asked in Winter 2025 Q4c

(c)
7 marks

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?

Q.5

14 Marks
(a)
3 marksAsked in 2 of 7 papers
What is the use of %timeit and %%timeit magic functions?

Also asked in Summer 2025 Q5a OR

(b)
4 marksAsked in 3 of 7 papers
Discuss importance of covariance and correlation in EDA.

Also asked in Summer 2025 Q5a, Winter 2024 Q4a

(c)
7 marks

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

(a)
3 marks
Explain different interfaces from Scikit-learn library.
(b)
4 marksAsked in 3 of 7 papers
Explain the importance of chi-square test in EDA.

Also asked in Winter 2025 Q5a, Summer 2023 Q1b

(c)
7 marks
Write a note on different descriptive statistics measures for numeric data.

More Python for Data Science papers

Questions repeat across sessions. Working through two or three papers shows you which topics GTU asks most.

Preparing with friends?

Send this paper to your class group. Every question has its own link.

About this paper

Official Gujarat Technological University (GTU) examination paper 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.

ViewDownload PDF