0% found this document useful (0 votes)
297 views3 pages

23CSE312-MQP Python Sjbit

This document is a model question paper for the Python for Data Analytics course for the B.E. degree, covering various modules related to data analysis, Python programming, and data visualization. It includes instructions for students, a breakdown of questions by module, and specific tasks related to data handling using Python and Pandas. The exam is scheduled for January/February 2025 and consists of five full questions to be answered.

Uploaded by

hhh
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)
297 views3 pages

23CSE312-MQP Python Sjbit

This document is a model question paper for the Python for Data Analytics course for the B.E. degree, covering various modules related to data analysis, Python programming, and data visualization. It includes instructions for students, a breakdown of questions by module, and specific tasks related to data handling using Python and Pandas. The exam is scheduled for January/February 2025 and consists of five full questions to be answered.

Uploaded by

hhh
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

USN 23CSE312

FIRST Semester B. E. Degree Semester End Examination (SEE), Jan/ Feb 2025

Python for Data Analytics


(Model Question Paper - 1)
[Time: 3 Hours] [Maximum Marks: 100]
Instructions to students:
i. Answer FIVE FULL Questions as per choice.
ii. Use BLACK ball point pen for text, figure, table, etc.
iii. Assume missing data, if any.
RBT
Module 1 Marks CO
Level

1. a) What are the different stages involved in data analysis? [10 Marks] CO1 L2

b) What are the two main purposes of predictive modeling in data analysis? [10 Marks] CO1 L2
OR
2. a) Differentiate between quantitative and qualitative data analysis? [10 Marks] CO1 L2

b) What are some of the benefits of using Python for data analysis? [10 Marks] CO1 L2
Module 2
Discuss the difference between mutable and immutable data types in
3. a) [10 Marks] CO2 L2
Python. Give examples for each type.
Explain the different ways to print output to the console in Python,
b) [10 Marks] CO2 L2
including the use of formatting techniques and f-strings.
OR
4. a) Create a Python program that uses if-else statements to determine whether [10 Marks] CO2 L3
a number is positive, negative, or zero.
b) Define a Python function that takes two numbers as input and returns their [10 Marks] CO2 L2
sum, difference, product, and quotient.
Module 3
What is the difference between array(), zeros(), and ones() functions in
5. a) [10Marks] CO3 L2
NumPy?
b) What is broadcasting in NumPy, and how does it work with arrays of [10 Marks] CO3 L1
different shapes?
OR
6. a) How do you access individual elements, rows, and columns in a NumPy [10 Marks]
CO3 L2
array?
How can you create an array with evenly spaced values using arange() and
b) [10 Marks] CO3 L2
linspace()?
Module 4

SJB Institute of Technology, Bengaluru


(An Autonomous institute under VTU, Belagavi, Karnataka, India) Page 1 of 3
Given a DataFrame named df that contains the following data about
students:
Given a DataFrame named df that contains the following data about
students:

Name Age Grade City

Alice 20 A New York

Bob 21 B Los Angeles


7. a) [10 Marks] CO4 L3
Charlie 19 C Chicago

David 22 A Houston

i. Define the DataFrame using the provided data.


ii. Select and display the Grade of the student named "Charlie".
iii. Assign a new value of 23 to the Age of "Alice".
iv. Check if the value A is present in the Grade column and explain how
you would confirm this.
v. Delete the City column from the DataFrame.

You have a DataFrame containing sales data. Write a Pandas code to calculate the
total sales for each region, sort the data by sales, and plot the result for the given
data:
sales_data = {
b) 'Region': ['North', 'South', 'East', 'West', 'North', 'South', 'East', 'West', [10 Marks] CO4 L3

'North', 'South'],
' Sales': [200, 150, 300, 250, 400, 200, 100, 150, 300, 350]
}
OR
Explain how to read a CSV file into a Pandas DataFrame. What parameters
8. a) can be used to handle specific scenarios like missing values or custom [06 Marks] CO4 L2
delimiters?
Explain how to read tables from an HTML page into a Pandas DataFrame
b) using the read_html() function. What parameters are essential for this [06 Marks] CO4 L3
operation?

SJB Institute of Technology, Bengaluru


(An Autonomous institute under VTU, Belagavi, Karnataka, India) Page 2 of 3
Given an Excel file named sales_data.xlsx containing multiple sheets (e.g.,
"Q1", "Q2", "Q3"), outline the steps to perform the following tasks:
c) 1. Read the Excel file into a Pandas DataFrame. [8 Marks] CO4 L2
2. Extract data from the sheets named "Q1" and "Q2".
3. Describe the steps to write a Pandas DataFrame to a CSV file

Module 5

9. a) Explain the architecture of the Matplotlib library and how its components [10 Marks] CO5 L2
interact to create visualizations.
b) Discuss the role of kwargs in customizing plots using Pyplot. Provide [5 Marks] CO5 L3
examples of common keyword arguments and their effects.
Compare and contrast line charts and bar charts in terms of when to use
c) each type. Provide examples of scenarios where a line chart would be [5 Marks] CO5 L3
preferable.
OR
10. a) How do you create a simple line chart using Pyplot? Describe the essential [10 Marks] CO5 L3
functions and parameters involved.
b) Explain how to create a histogram using Matplotlib. What are the key [05 Marks] CO5 L3
parameters that affect the appearance and accuracy of a histogram?
How do you create a bar chart using Matplotlib? Describe the necessary
c) [05 Marks] CO5 L3
steps and key parameters to customize the appearance of the chart.
*********

SJB Institute of Technology, Bengaluru


(An Autonomous institute under VTU, Belagavi, Karnataka, India) Page 3 of 3

You might also like