0% found this document useful (0 votes)
14 views15 pages

3150713_(3)_merged[1]

Uploaded by

higewox956
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)
14 views15 pages

3150713_(3)_merged[1]

Uploaded by

higewox956
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
You are on page 1/ 15

Enrolment No.

/Seat No_____________

GUJARAT TECHNOLOGICAL UNIVERSITY


BE - SEMESTER–V (NEW) EXAMINATION – SUMMER 2024
Subject Code:3150713 Date:16-05-2024
Subject Name:Python for Data Science
Time:02:30 PM TO 05:00 PM Total Marks:70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Simple and non-programmable scientific calculators are allowed.

MARKS
Q.1 (a) Briefly discuss major coding styles supported by python programming language. 03
(b) What will be the output of the below python code? 04
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) Write a python program to take two strings and position value (starting from 07
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="Gujarat Technological University")

Q.2 (a) Discuss characteristics of Set and Dictionary data structures in python. 03
(b) Write a short note on TF-IDF transformations. 04
(c) Explain different stages of the data science pipeline. 07
OR
(c) Discuss major libraries available with python language with its application in 07
the field of Data Science.
Q.3 (a) Explain different data structures available in pandas library. 03
(b) Below is the content of a csv file named "data.csv". 04
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)
(c) Why it is important to find missing values from a dataset? Discuss different 07
approaches to handle missing values with appropriate examples.
OR
Q.3 (a) Write a short note on categorical variables. 03
(b) Consider below dataframe in python 04

A B C
1
0 7 1 4
1 2 5 8
2 3 6 9

i. Write a code to sort this dataframe by column A.


ii. Write a code to sort this dataframe by row 0 (first row).
(c) Explain the process of Word Tokenization, Stemming and Stop word removal 07
using nltk library with suitable example code.
Q.4 (a) Discuss how to create pie chart using matplotlib library with suitable example. 03
(b) Demonstrate how to remove a row and a column from a dataframe with 04
appropriate example code.
(c) Data of marks for five students in three subjects is as given below. 07
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?
OR
Q.4 (a) Explain how to add markers and change line color and line style in a line graph 03
using matplotlib library.
(b) An adjacency matrix for a graph with for nodes named 0, 1, 2, 3 is given below. 04
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.
(c) Below is the data about average temperature (in °C) at a place for 15 days. 07
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 (a) What is the use of %timeit and %%timeit magic functions? 03
(b) Discuss importance of covariance and correlation in EDA. 04
(c) What is regression and classification problems? Explain any one with suitable 07
example.
OR
Q.5 (a) Explain different interfaces from Scikit-learn library. 03
(b) Explain the importance of chi-square test in EDA. 04
(c) Write a note on different descriptive statistics measures for numeric data. 07

*************

2
Seat No.: ________ Enrolment No.___________

GUJARAT TECHNOLOGICAL UNIVERSITY


BE – SEMESTER- V EXAMINATION-SUMMER 2023
Subject Code: 3150713 Date: 23/06/2023
Subject Name: Python for Data Science
Time: 02:30 PM TO 05:00 PM Total Marks: 70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Simple and non-programmable scientific calculators are allowed.

MARKS
Q.1 (a) Write a single line code to get the value of "type" from the given dictionary in 03
such a way that it does not produce any error or exception even if any key from
the dictionary is misspelled. e.g. batters is misspelled as bateers. Still, your code
must traverse the dictionary and fetch the value “Regular” of the key “type”.
{
"batters": {
"batter": [
{
"batter": [
{
"batter": [{
"type": "Regular"
}]
}]
}]
}
}
(b) What is chi-square test? why it is necessary in data analysis? 04
(c) Explain following string functions with suitable example. 07
len, count, title, lower, upper, find, rfine, replace

Q.2 (a) List and explain the reasons which make python programming popular in Data 03
Science.
(b) Differentiate: Dictionary and List 04
(c) What do you mean by Exploratory Data Analysis? List and explain the task which 07
needs to be performed in EDA.
OR
(c) Define Standardization. Explain Z-score standardization with suitable example. 07

Q.3 (a) Depict steps to create a scatter plot with example. 03


(b) Establish relationship between AI, data science and big data. 04
(c) Provide explanations on the importance of Graphs in Data Science. 07
OR
Q.3 (a) Define correlation and explain its importance in Data Science. 03
(b) Provide duties performed by a Data Scientist with suitable example 04
(c) Elaborate Graphs along with its types. 07

Q.4 (a) Differentiate: Bar graph vs. Histogram 03


(b) Explain Training and Testing with suitable example. 04
(c) Elaborate a bag of word concept in detail. 07
OR
Q.4 (a) Why data visualization is important in Data Science? 03
(b) Explain HTML parsing using Beautiful soup. 04
(c) Explain stemming in detail with relatable example. 07

Q.5 (a) Provide your views on Data wrangling with suitable example. 03
(b) Define covariance and explain its importance with appropriate example. 04
(c) Elaborate XPath in detail with relatable example. 07
OR
Q.5 (a) Explain Hashing Tricks and its importance with suitable example. 03
(b) Explain importance of Legends, Labels and Annotations in Graphs. 04
(c) Describe sampling along with its types in detail with suitable example. 07

*************
Seat No.: ________ Enrolment No.___________

GUJARAT TECHNOLOGICAL UNIVERSITY


BE - SEMESTER–V (NEW) EXAMINATION – WINTER 2023
Subject Code:3150713 Date:05-12-2023
Subject Name: Python for Data Science
Time:10:30 AM TO 01:00 PM Total Marks:70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Simple and non-programmable scientific calculators are allowed.

Marks

Q.1 (a) Why python is very popular language in 21st Century? 03


(b) Write any four-python command that demonstrate Python as 04
calculator.
(c) Write a python program to display the Fibonacci sequence 07
up to nth term.

Q.2 (a) Explain with example use of range () function in python. 03


(b) Explain the phases of Data Science Pipeline. 04
(c) List the different data structure used in python. Explain any 07
three with example of each.
OR
(c) Write a Python program to input the string from user and 07
count number of Vowel in given string.
Q.3 (a) What is the use of magic function in python? Explain with 03
the help of example.
(b) Explain the use of following libraries of python in data 04
science.
i. Matplotlib
ii. Scikit-learn
(c) Write a python code to read the local image, obtain statistics 07
about that image, and display the image onscreen.
OR
Q.3 (a) Write a python code to print current date and time. 03
(b) Write the difference between numpy and pandas. 04
(c) Describe the three levels of flat-file dataset. Explain any two 07
with the help of example.
Q.4 (a) List the different line styles used in charts. 03
(b) Explain with the example use of axes () and grid () method 04
in plots.
(c) Write a python code to draw two lines on plot. Both lines 07
should be depicted with different colors.
OR
Q.4 (a) What is the use of %matplotlib inline command? 03
(b) What is the use of labels and legends in plot? Explain with 04
example.

1
(c) Write a python code to draw a bar chart utilizing at least three 07
properties of it.
Q.5 (a) Explain Classification and clustering class of Scikit-learn. 03
(b) Illustrate the concept of regression class of Scikit-learn with 04
the help of small example.
(c) What is the use of hashing trick and hash function in Scikit- 07
learn? Explain in detail with example.
OR
Q.5 (a) What do you mean by categorical data? Explain with small 03
example.
(b) Explain the use of skew () and kurtosis () function. 04
(c) Explain EDA approach in detail. 07

***********

2
Seat No.: ________ Enrolment No.___________

GUJARAT TECHNOLOGICAL UNIVERSITY


BE - SEMESTER–V(NEW) EXAMINATION – SUMMER 2022
Subject Code:3150713 Date:02/06/2022
Subject Name:Python for Data Science
Time:02:30 PM TO 05:00 PM Total Marks: 70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Simple and non-programmable scientific calculators are allowed.

MARKS
Q.1 (a) List Advantages of Python. 03
(b) Differentiate Numpy and Pandas. 04
(c) Explain Exploratory Data Analysis (EDA). 07

Q.2 (a) Explain String Slicing in python with Example. 03


(b) List and Explain different programming styles in python. 04
(c) Write a program to check whether the given number is prime or not. 07
OR
(c) Write a program to print Fibonacci series up to number given by user. 07

Q.3 (a) Differentiate rand and randn function in Numpy. 03


(b) Explain DataFrame in Pandas with example. 04
(c) Write a program to print following patterns. 07
1)
*
**
***
****
2)
$$$$
$$$
$$
$
3)
#####
###
#
###
#####
OR
Q.3 (a) Explain Groupby function in pandas with example. 03
(b) Explain how to deal with missing data in Pandas. 04
(c) Explain Web Scrapping with Example using Beautiful Soup library. 07

Q.4 (a) Explain Bag of Word model. 03


(b) Differentiate join and merge functions in pandas. 04
(c) Write a program which takes 2 digits, X,Y as input and generates a 2- 07
dimensional array of size X * Y. The element value in the i-th row
and j-th column of the array should be i*j.
1
OR
Q.4 (a) Explain Hashing Trick in python with example. 03
(b) Write a brief note on NetworkX library. 04
(c) List and Explain different graphs in MatPlotLib. 07

Q.5 (a) Explain Labels, Annotation and Legends in MatPlotLib. 03


(b) Differentiate Supervised and Unsupervised learning. 04
(c) Explain Regression with example. 07
OR
Q.5 (a) Write a program to print Current date and time. 03
(b) Write a program to interchange the List elements on two positions 04
entered by a user
(c) Explain Classification with example. 07

*************

2
Seat No.: ________ Enrolment No.___________

GUJARAT TECHNOLOGICAL UNIVERSITY


BE - SEMESTER–V (NEW) EXAMINATION – WINTER 2022
Subject Code:3150713 Date:04-01-2023
Subject Name:Python for Data Science
Time:10:30 AM TO 01:00 PM Total Marks:70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Simple and non-programmable scientific calculators are allowed.

Q.1 (a) What is the role of python in data science? 03


(b) Explain the input function of python that demonstrates type casting. 04
(c) Explain following data structures of python with suitable example. 07
1. String
2. List
3. Tuple
4. Dictionary
Q.2 (a) Differentiate: C and Python. 03
(b) How to format Date and Time in python. Explain it with example. 04
(c) Give comparison between Numpy and Pandas. 07
OR
(c) Write a python code to read data from text file. 07
Q.3 (a) Explain %matplotlib magic function. 03
(b) Explain stemming and stop words removal operation in python. 04
(c) Write a python program to implement Fibonacci sequence for given input. 07
OR
Q.3 (a) What are the magic functions in Jupyter? Explain with example. 03
(b) With example explain the concept of bags of words model. 04
(c) Write a python program that finds the factorial of a natural number n. 07
Q.4 (a) Explain labels, annotations and legends. 03
(b) Explain with example how to parse XML and HTML. 04
(c) Write a python code that demonstrate hashing trick. 07
OR
Q.4 (a) Explain any three functions from Scikit learn. 03
(b) Explain how to create data science pipeline. 04
(c) Write a python program to demonstrate the concept of skewness and kurtosis. 07
Q.5 (a) Explain EDA in detail. 03
(b) Write a python code to access data from web. 04
(c) Write a small code to perform following operations on data: Slicing, Dicing, 07
Concatenation, Transformation.
OR
Q.5 (a) Explain Z-score standardization. 03
(b) How to Obtain online graphics and multimedia. Explain with example. 04
(c) Write a code to draw pie chart using python’s library. 07

*************

1
Seat No.: ________ Enrolment No.___________

GUJARAT TECHNOLOGICAL UNIVERSITY


BE - SEMESTER–V (NEW) EXAMINATION – SUMMER 2021
Subject Code:3150713 Date:07/09/2021
Subject Name:Python for Data Science
Time:10:30 AM TO 01:00 PM Total Marks: 70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Simple and non-programmable scientific calculators are allowed.

MARKS
Q.1 (a) Differentiate the list and dictionary data types of python by their 03
characteristics along with example in brief.
(b) What do you mean by slicing operation in string of python? Write an 04
example of slicing to fetch first name and last name from full name
of person and display it.
(c) Which are the basic activities we performed as a part of data science 07
pipeline? Summarize and explain in brief.

Q.2 (a) What is the core competencies needed to become a data scientist? 03
Explain in brief.
(b) Compare and summarize four different coding styles supported by 04
Python language.
(c) Summarize the characteristics of NumPy, Pandas, Scikit-Learn and 07
matplotlib libraries along with their usage in brief.
OR
(c) What do you mean by prototyping? List the phases of prototyping 07
and experimentation process and explain in brief.
Q.3 (a) Compare the numpy and pandas on the basis of their characteristics 03
and usage.
(b) For what purpose sampling is used. Demonstrate random sampling 04
with example.
(c) What is the need of streaming the data? Explain data uploading and 07
streaming data with example.
OR
Q.3 (a) How XPath is useful for analysis of html data? Explain in brief. 03
(b) Define term n-gram. Explain the TF-IDF techniques. 04
(c) List the techniques to handle missing data. Explain various 07
techniques with example.

Q.4 (a) List various types of graph/chart available in the pyplot of matplotlib 03
library for data visualization. Explain any two of them in brief.
(b) What kind data is analyzed with Bag of word model? Explain it with 04
example.
(c) What do you mean by time series data? How can we plot it? Explain 07
it with example to plot trend over time

OR

1
Q.4 (a) Compare bar graph, box-plot and histogram with respect to their 03
applicability in data visualization.
(b) Define stemming. Explain the concept of stemming with example. 04
(c) What is the use of scatter-plot in data visualization? Can we draw 07
trendline in scatter-plot? Explain it with example.

Q.5 (a) Define the term Data wrangling. Explain the steps needed to perform 03
data wrangling.
(b) Why we need to perform Z-score standardization in EDA? Justify it 04
with example.
(c) What is the use of hash function in EDA? Express various hashing 07
trick along with example.
OR
Q.5 (a) What do you mean by Exploratory Data Analysis (EDA)? How t-test 03
is useful for EDA?
(b) What do you mean by covariance? What is the importance of 04
covariance in data analysis? Explain it with example.
(c) List different way for defining descriptive statistics for 07
Numeric Data. Explain them in brief.

*************

2
Seat No.: ________ Enrolment No.___________

GUJARAT TECHNOLOGICAL UNIVERSITY


BE - SEMESTER–V (NEW) EXAMINATION – WINTER 2021
Subject Code:3150713 Date:15/12/2021
Subject Name:Python for Data Science
Time:02:30 PM TO 05:00 PM Total Marks: 70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Simple and non-programmable scientific calculators are allowed.

MARKS
Q.1 (a) What is the role of Python in Data science? 03
(b) Differentiate List and Tuple in Python 04
(c) Explain data science pipeline in details. 07

Q.2 (a) What is HTML parsing? 03


(b) Write a python code to find factorial of number using function. 04
(c) Explain Dictionary in Python with example 07
OR
(c) Is String a mutable data type? Also explain the string operations 07
length, indexing and slicing in detail with an appropriate
example

Q.3 (a) List and explain any three Magic function. 03


(b) Explain Slicing rows and columns with example. 04
(c) What do you mean by missing values? Explain the different ways 07
to handle the missing value with example.
OR
Q.3 (a) What is Categorical Variables? Explain it with example. 03
(b) How to read data from relational database? Briefly explain it. 04
(c) What is the use of following operations on Panda’s Data Frames? 07
Explain with a small example of each.
1. shape 2. tail() 3. describe()

Q.4 (a) Explain hist() function with code. 03


(b) Write a program using Numpy to count number of “C” element 04
wise in a given array.
(c) What do you understand by Data visualization? Discuss some 07
Python’s data visualization techniques.
OR
Q.4 (a) Explain bar() function with code. 03
(b) What are the different ways to remove duplicate values from 04
dataset?
(c) Write a simple python program that draws a line graph where x 07
= [1,2,3,4] and y = [1,4,9,16] and gives both axis label as “X-
axis”and “Y-axis”.

Q.5 (a) What is Scikit-learn? 03


(b) Explain Box plot with example. 04
Page 1 of 2
(c) Write a Python programming to create a pie chart with a title of 07
the popularity of programming Languages.
Sample data:
Programming languages: Java, Python, PHP, JavaScript, C#,
C++
Popularity: 22.2, 17.6, 8.8, 8, 7.7, 6.7
OR
Q.5 (a) Define covariance and correlation 03
(b) Explain scatterplots with example. 04
(c) What is Data Wrangling process? Define data exploratory data 07
analysis? Why EDA is required in data analysis?

******All THE BEST*******

Page 2 of 2
Seat No.: ________ Enrolment No.___________

GUJARAT TECHNOLOGICAL UNIVERSITY


BE- SEMESTER–V (NEW) EXAMINATION – WINTER 2020
Subject Code:3150713 Date:22/01/2021
Subject Name:Python for Data Science
Time:10:30 AM TO 12:30 PM Total Marks: 56
Instructions:
1. Attempt any FOUR questions out of EIGHT questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.

MARKS

Q.1 (a) Discuss the role of indentation in python. 03


(b) Explain range() function with suitable examples. 04
(c) Write a python program to find the factorial of a given number using 07
recursion.

Q.2 (a) Explain sampling in terms of data science? 03


(b) List and explain different coding styles supported by python. 04
(c) Discuss why python is a first choice for data scientists? 07

Q.3 (a) Explain TF-IDF transformations. 03


(b) Explain categorical variables in detail. 04
(c) Write a python program to read the data from XML file using pandas 07
library.

Q.4 (a) Describe date time transformation using datetime module. 03


(b) Explain a bag of words model in detail. 04
(c) Explain imputation in detail with example. 07

Q.5 (a) List the features of matplotlib. 03


(b) Write a python program to read data from a text file using pandas 04
library.
(c) Explain time series plot with appropriate examples. 07

Q.6 (a) List the type of plots that can be drawn using matplotlib. 03
(b) Write a python program to read data from CSV files using pandas. 04
(c) Explain pie chart plot with appropriate examples. 07

Q.7 (a) List and explain interfaces of SciKit-learn. 03


(b) List the multiprocessing tasksthat can be done using SciKit-learn? 04
(c) Define the classification problem. How can it be solved using 07
1
SciKit-learn?

Q.8 (a) Define EDA. List the tasks need to be carried out in EDA? 03
(b) How hash functions can be useful to solve data science problems? 04
(c) Define the regression problem. How can it be solved using SciKit- 07
learn?

*************

You might also like