You are on page 1of 20

Savitribai Phule Pune University

T.Y.B.Sc Computer Science Practical Examination Feb-2022


Semester V (2021 pattern)
Lab Course II: CS-358 (Web Technology and Data Science)
Duration: 3 Hours Maximum Marks: 35

Q1. Write a Python program for the following task. [10]


a) Load the iris dataset from a given csv file into a data frame.
b) Print the shape, number of rows-columns, data types, feature names and the
description of the data.
c) View basic statistical details of the data.
d) Add 5 rows with duplicate values and missing values.
e) Add a column ‘remarks’ with empty values. Display the data.

Q.2 Create following Bootstrap Web Layout Design. There are 9 blocks of the region
in the arrangement. You can either place the images in them or the contents.

[20]

Q3. Viva [05]

Slip 1
Savitribai Phule Pune University
T.Y.B.Sc Computer Science Practical Examination Feb-2022
Semester V (2021 pattern)
Lab Course II: CS-358 (Web Technology and Data Science)
Duration: 3 Hours Maximum Marks: 35

Q1. Write a Python program for the following task. [10]


a) Load the iris dataset from a given csv file into a data frame.
b) Print the shape, number of rows-columns, data types, feature names and the
description of the data.
c) Add 5 rows with duplicate values and missing values. Print the modified data
d) To get the number of observations, missing values and duplicate values.
e) Drop all null and empty values. Print the modified data

Q2. Consider the following entities and their relationships

Event (eno , title , date )


Committee ( cno , name, head , from_time ,to_time , status)

Event and Committee have many to many relationship. Write a script in PHP to
accept title of event and modify status committee as working.

[20]

Q3. Viva [05]

Slip 2
Savitribai Phule Pune University
T.Y.B.Sc Computer Science Practical Examination Feb-2022
Semester V (2021 pattern)
Lab Course II: CS-358 (Web Technology and Data Science)
Duration: 3 Hours Maximum Marks: 35

Q1. Write a Python program for the following task. [10]


a) Load the iris dataset from a given csv file into a data frame.
b) Print the shape, number of rows-columns, data types, feature names and the
description of the data.
c) Add 5 rows with duplicate values and missing values.
d) To get the number of observations, missing values and duplicate values.
e) To generate a line plot of name vs percentage.

Q2. Write a PHP program to read a flat file “item.dat”, which contains details of 5
different items such as Item code, Item Name, unit sold, and Rate. Display the
Bill in tabular format. [20]

Q3. Viva [05]

Slip 3
Savitribai Phule Pune University
T.Y.B.Sc Computer Science Practical Examination Feb-2022
Semester V (2021 pattern)
Lab Course II: CS-358 (Web Technology and Data Science)
Duration: 3 Hours Maximum Marks: 35

Q1. Write a Python program for the following task. [10]


a) Load the heights and weights dataset from a given csv file into a data frame.
b) Print the first, last 10 rows and random 20 rows.
c) To find the shape, size, datatypes of the data frame object.
d) To view basic statistical details of the data.
e) To get the number of observations, missing values and nan values.

Q2. Considerer the following entities and their relationships


Student (Stud_id,name,class)
Competition (c_no,c_name,type)
Relationship between student and competition is many-many with attribute rank
and year. Create a RDB in 3NF for the above and solve the following. Using
above database write a script in PHP to accept a competition name from user and
display information of student who has secured 1st rank in that competition.
[20]
Q3. Viva [05]

Slip 4
Savitribai Phule Pune University
T.Y.B.Sc Computer Science Practical Examination Feb-2022
Semester V (2021 pattern)
Lab Course II: CS-358 (Web Technology and Data Science)
Duration: 3 Hours Maximum Marks: 35

Q1. Write a Python program for the following task. [10]


a) Load the heights and weights dataset from a given csv file into a data frame.
b) Print the first, last 10 rows and random 20 rows.
c) To add a column to the data frame “BMI” which is calculated as : weight/height2
d) To find the maximum and minimum of BMI.
e) To generate a scatter plot of height vs weight

Q2. Create following layout using bootstrap

[20]

Q3. Viva [05]

Slip 5
Savitribai Phule Pune University
T.Y.B.Sc Computer Science Practical Examination Feb-2022
Semester V (2021 pattern)
Lab Course II: CS-358 (Web Technology and Data Science)
Duration: 3 Hours Maximum Marks: 35

Q1. Write a Python program for the following task. [10]


a) Create a data frame containing columns name, age and percentage. Add 10 rows
to the data frame. View the data frame.
b) To find the maximum and minimum value of numeric data field.
c) To compute Euclidian Distance between two data points in a dataset. [Hint: Use
linalgo.norm function from NumPy]
d) Display average age of students, average of percentage.
e) Find out mean, range and IQR for this data.

Q2. Write a PHP script for the following: Design a form to accept a string.
a. Write a function to find the length of given string without using built in
functions.
b. Write a function to count the total number of vowels i.e. (a,e,i,o,u) ) from the
string.
c. Convert the given string to lowercase and then to Title case.
d. Pad the given string with “*” from left and right both the sides.
e. Remove the leading whitespaces from the given string.
f. Find the reverse of given string.(use built-in functions)
(Use radio buttons and the concept of function. Use ‘include’ construct or
‘require’ stmt.)
[20]

Q3. Viva [05]

Slip 6
Savitribai Phule Pune University
T.Y.B.Sc Computer Science Practical Examination Feb-2022
Semester V (2021 pattern)
Lab Course II: CS-358 (Web Technology and Data Science)
Duration: 3 Hours Maximum Marks: 35

Q1. Write a Python program for the following task. [10]


a) Load the heights and weights dataset from a given csv file into a data frame.
b) Print the first, last 10 rows and random 10 rows.
c) Display maximum and minimum values of all numeric attributes.
d) Find number of records for each distinct value of class attribute.
e) Display column-wise mean, and median

Q2. Write a PHP program to read text file and display the contents of the file with its
size. [20]

Q3. Viva [05]

Slip 7
Savitribai Phule Pune University
T.Y.B.Sc Computer Science Practical Examination Feb-2022
Semester V (2021 pattern)
Lab Course II: CS-358 (Web Technology and Data Science)
Duration: 3 Hours Maximum Marks: 35

Q1. Write a program in python to perform following task. [10]


a) Create a data frame of following data set. And Display the data frame.
Country, Age, Salary, Purchased
France, 44, 72000, No
Spain, 27, 48000, Yes
Germany, 30, 54000, No
Spain, 38, 61000, No
Germany, 40, , Yes
France, 35, 58000, Yes
Spain, , 52000, No
France, 48, 79000, Yes
Germany, 50, 83000, No
France, 37, 67000, Yes
b) Print the shape, number of rows-columns, data types, feature names and the
description of the data.
c) Calculate the mean of age and salary column.
d) Replace missing value of salary, age column with mean of that column.
e) Apply OneHot coding on Country column.
Q2. Create HTML5 page with following specifications
i) Title should be about your City.
ii) Color the background by Pink color.
iii) Place your city name at the top of page in large text and in blue color.
iv) Add names of the landmarks in your city, each in different color, style and
font
v) Add scrolling text about your City.
vi) Add any image at the bottom. (Use inline CSS to format the web page)
[20]
Q3. Viva [05]

Slip 8
Savitribai Phule Pune University
T.Y.B.Sc Computer Science Practical Examination Feb-2022
Semester V (2021 pattern)
Lab Course II: CS-358 (Web Technology and Data Science)
Duration: 3 Hours Maximum Marks: 35

Q1. Write a Python program for the following task. [10]


a) Create a data frame of following data set. And Display the data frame.
Country, Age, Salary, Purchased
France, 44, 72000, No
Spain, 27, 48000, Yes
Germany, 30, 54000, No
Spain, 38, 61000, No
Germany, 40, , Yes
France, 35, 58000, Yes
Spain, , 52000, No
France, 48, 79000, Yes
Germany, 50, 83000, No
France, 37, 67000, Yes
b) Print the shape, number of rows-columns, data types, feature names and the
description of the data.
c) Calculate the median of age and salary column.
d) Replace missing value of salary, age column with median of that column.
e) Apply Label encoding on purchased column

Q2. Write HTML5 code which generates the following output and display each
element of list in different size, color & font. Use external CSS to format the list

[20]
Q3. Viva [05]
Slip 9
Savitribai Phule Pune University
T.Y.B.Sc Computer Science Practical Examination Feb-2022
Semester V (2021 pattern)
Lab Course II: CS-358 (Web Technology and Data Science)
Duration: 3 Hours Maximum Marks: 35

Q1. Write a Python program for the following task. [10]


a) Load the dataset from “winequality-red.csv” file into a data frame. Display data
frame.
b) Print the shape, number of rows-columns, data types, feature names and the
description of the data.
c) View basic statistical details of the data.
d) Find the min and max value of numerical field.
e) Normalised the dataset using MinMaxScaler class

Q2. Write a script to accept two integers (Use html form having 2 textboxes).
Write a PHP script to,
a. Find mod of the two numbers.
b. Find the power of first number raised to the second.
c. Find the sum of first n numbers (considering first number as n)
d. Find the factorial of second number.
(Write separate function for each of the above operations.)
[20]

Q3. Viva [05]

Slip 10
Savitribai Phule Pune University
T.Y.B.Sc Computer Science Practical Examination Feb-2022
Semester V (2021 pattern)
Lab Course II: CS-358 (Web Technology and Data Science)
Duration: 3 Hours Maximum Marks: 35

Q1. Write a Python program for the following task. [10]


a) Load the dataset from “winequality-red.csv” file into a data frame. Display data
frame.
b) Print the shape, number of rows-columns, data types, feature names and the
description of the data.
c) View basic statistical details of the data.
d) Standardizing Data (transform them into a standard Gaussian distribution with a
mean of 0 and a standard deviation of 1)
e) Binarizing Data using the Binarizer class (Using a binary threshold, it is possible
to transform our data by marking the values above it 1 and those equal to or below
it, 0)

Q2. Write a PHP script for the following: Design a form to accept two strings from the
user.
a. Find whether the small string appears at the start of the large string.
b. Find the position of the small string in the big string.
c. Compare both the string for first n characters, also the comparison should not
be case sensitive. [20]

Q3. Viva [05]

Slip 11
Savitribai Phule Pune University
T.Y.B.Sc Computer Science Practical Examination Feb-2022
Semester V (2021 pattern)
Lab Course II: CS-358 (Web Technology and Data Science)
Duration: 3 Hours Maximum Marks: 35

Q1. Write a Python program for the following task. [10]


a) Load the dataset from “winequality-red.csv” file into a data frame. Display data
frame.
b) Print the shape, number of rows-columns, data types, feature names and the
description of the data.
c) View basic statistical details of the data.
d) Binarizing Data using the Binarizer class (Using a binary threshold, it is possible
to transform our data by marking the values above it 1 and those equal to or below
it, 0)
e) Normalizing Data (rescale each observation to a length of 1 (a unit norm). For
this, use the Normalizer class.)

Q2. Write a PHP script for the following: Design a form having a text box and a drop
down list containing any 3 separators(e.g. #, |, %, @, ! or comma) accept a strings
from the user and also a separator.
a. Splitthe string into separate words using the given separator.
b. Replace all the occurrences of separator in the given string with some other
separator.
c. Find the last word in the given string(Use strrstr() function).
[20]

Q3. Viva [05]

Slip 12
Savitribai Phule Pune University
T.Y.B.Sc Computer Science Practical Examination Feb-2022
Semester V (2021 pattern)
Lab Course II: CS-358 (Web Technology and Data Science)
Duration: 3 Hours Maximum Marks: 35

Q1. Write a Python program for the following task. [10]


a) Load the dataset from “Student_bucketing.csv” file into a data frame. Display
data frame.
b) Print the shape, number of rows-columns, data types, feature names and the
description of the data.
c) View basic statistical details of the data.
d) Discretized the marks column into five discrete buckets, the labels need to be
populated accordingly with five values: Poor, Below_average, Average,
Above_average, and Excellent. Perform bucketing using the cut () function on the
mark column.
e) Display the top 10 rows.
Q2. Create your array of 30 high temperatures, approximating the weather for a spring
month, then find the average high temp, the five warmest high temps and the five
coolest high temps. Display the result on the browser.
Hint: a) Use array_slice b) the HTML character entity for the degree sign is &
deg;.
[20]

Q3. Viva [05]

Slip 13
Savitribai Phule Pune University
T.Y.B.Sc Computer Science Practical Examination Feb-2022
Semester V (2021 pattern)
Lab Course II: CS-358 (Web Technology and Data Science)
Duration: 3 Hours Maximum Marks: 35

Q1. Write a Python program for the following task. [10]


a) Create the dataset consists of student details such as Student_id, Age, Class,
Marks. Display data frame.
b) Print the shape, number of rows-columns, data types, feature names and the
description of the data.
c) Find arithmetic mean of age.
d) Find geometric mean of Marks.
e) Display the data in a pie chart against Student_id and Marks.

Q2. Write a menu driven program to perform the following stack and queue related
operations:[Hint: use Array_push(), Array_pop(), Array_shift(), Array_unshift() ]
a) Insert an element in stack
b) Delete an element from stack
c) Display the contents of stack
d) Insert an element in queue
e) Delete an element from queue
f) Display the contents of queue
[20 ]

Q3. Viva [05]

Slip 14
Savitribai Phule Pune University
T.Y.B.Sc Computer Science Practical Examination Feb-2022
Semester V (2021 pattern)
Lab Course II: CS-358 (Web Technology and Data Science)
Duration: 3 Hours Maximum Marks: 35

Q1. Write a Python program for the following task. [10]


a) Create the dataset consists of Employee details such as Emp_id, Age,
Designation, Salary. Display data frame.
b) Give the statistical details of data.
c) Display the data in bar chart against Emp_id and Salary.
d) create a graph to find relationship between the Age and Salary
e) Find geometric mean of Salary.

Q2. Write a PHP script that initialize an array.and inserts a new item in an array at
given position.
(hint : use array_splice())
[20]

Q3. Viva [05]

Slip 15
Savitribai Phule Pune University
T.Y.B.Sc Computer Science Practical Examination Feb-2022
Semester V (2021 pattern)
Lab Course II: CS-358 (Web Technology and Data Science)
Duration: 3 Hours Maximum Marks: 35

Q1. Write a Python program for the following task. [10]


a) Generate a random array A of 50 integers.
b) Display array A elements using a line chart. Apply appropriate color, labels and
styling options.
c) Display array A elements using a scatter plot. Apply appropriate color, labels and
styling options.
d) Display array A elements using a histogram. Apply appropriate color, labels and
styling options.
e) Add two outliers to the above data and display the box plot. Apply appropriate
color, labels and styling options.

Q2. Write a PHP script that initialize an array and find the elements from the array
that matches the given value using appropriate search function.
[20]

Q3. Viva [05]

Slip 16
Savitribai Phule Pune University
T.Y.B.Sc Computer Science Practical Examination Feb-2022
Semester V (2021 pattern)
Lab Course II: CS-358 (Web Technology and Data Science)
Duration: 3 Hours Maximum Marks: 35

Q1. Write a Python program for the following task. [10]


a) Load the iris dataset from a given csv file into a data frame. Display the data
frame.
b) Create a Bar plot to get the frequency of the three species of the Iris data.
c) Create a Pie plot to get the frequency of the three species of the Iris data.
d) Create a histogram of the three species of the Iris data.
e) Draw scatter plots to compare two features of the iris dataset.

Q2. Create a HTML document to display the following screen.

[20]

Q3. Viva [05]

Slip 17
Savitribai Phule Pune University
T.Y.B.Sc Computer Science Practical Examination Feb-2022
Semester V (2021 pattern)
Lab Course II: CS-358 (Web Technology and Data Science)
Duration: 3 Hours Maximum Marks: 35

Q1. Write a Python program for the following task. [10]


a) Load the dataset from iris.csv file into a data frame. Display the data frame.
b) Give the statistical details of data.
c) To create a graph to find relationship between the petal length and petal width.
d) To draw scatter plots to compare two features of the iris dataset.
e) To create box plots to see how each feature i.e. Sepal Length, Sepal Width, Petal
Length, Petal Width are distributed across the three species.

Q2. Write a HTML code, which generate the following output

List of
Books
Price
Item No Item
Name Rs. Paise

1 Programming in Python 500 50

2 Programming in Java 345 00

[20]

Q3. Viva [05]

Slip 18
Savitribai Phule Pune University
T.Y.B.Sc Computer Science Practical Examination Feb-2022
Semester V (2021 pattern)
Lab Course II: CS-358 (Web Technology and Data Science)
Duration: 3 Hours Maximum Marks: 35

Q1. Write a Python program for the following task. [10]


a) Create the dataset consists of Customer details such as Cust_id, Acc_no,
Acc_type, Acc_bal. Display data frame.
b) Give the statistical details of data.
c) Display the data in bar chart against Cust_id and Acc_bal.
d) Find the InterQuartile Range of Acc_bal.
e) Find geometric mean of Acc_bal.

Q2. Write a HTML script to design the following screen

[20]

Q3. Viva [05]

Slip 19
Savitribai Phule Pune University
T.Y.B.Sc Computer Science Practical Examination Feb-2022
Semester V (2021 pattern)
Lab Course II: CS-358 (Web Technology and Data Science)
Duration: 3 Hours Maximum Marks: 35

Q1. Write a Python program for the following task. [10]


a) Create the dataset consists of student details such as Student_id, Age, Class,
Marks. Display data frame.
b) Print the shape, number of rows-columns, data types, feature names and the
description of the data.
c) Find arithmetic mean of age.
d) Find geometric mean of Marks.
e) Display the data in a pie chart against Student_id and Marks.

Q2. Write the HTML code for generating the form as shown below.
Apply the internal CSS to following form change the font size of the heading to
6pt and change the color to red and also change the background color yellow

[20]

Q3. Viva [05]

Slip 20

You might also like