Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

V.V.P.

Engineering College
Department of Computer Engineering
Assignment – 1
AY. 2023-24 (ODD)

Semester: 5
Subject: Python for Data Science
Subject Code: 3150713

Sr.
Question/Task Marks CO CL
No.
1. Write a Python program to get a string made of 4 CO1 AP
the first 2 and the last 2 chars from a given a
string. If the string length is less than 2, return
instead of the empty string.

Sample String: 'dipesh'


Expected Result : dish
Sample String : 'd'
Expected Result : Empty String
2. Suppose there is a circle. There are petrol pumps 7 CO1 AP
on that circle. Petrol pumps are numbered to
(both inclusive). You have two pieces of
information corresponding to each of the petrol
pump: (1) the amount of petrol that particular
petrol pump will give, and (2) the distance from
that petrol pump to the next petrol pump.

Initially, you have a tank of infinite capacity


carrying no petrol. You can start the tour at any
of the petrol pumps. Calculate the first point from
where the truck will be able to complete the
circle. Consider that the truck will stop at each of
the petrol pumps. The truck will move one
kilometer for each litre of the petrol.

Input Format

The first line will contain the value of.


The next lines will contain a pair of integers
each, i.e. the amount of petrol that petrol pump
will give and the distance between that petrol
pump and the next petrol pump.

Output Format

An integer which will be the smallest index of the


petrol pump from which we can start the tour.

1
Sample Input

3
15
10 3
34

Sample Output

1
3. How are NumPy and SciPy related? 3 CO2 U
4. Does python call by reference or call by value? 3 U
CO1
Give the example.
5. How rapid development possible in data science 3 U
CO2
application using python?

Course Student will be able to


Outcome
CO1 Describe basics of python and its data structure.
CO2 Describe common Python functionality and features used for data
science.
CO3 Use python libraries to handle & visualize data.
CO4 Perform data wrangling & analysis using python libraries.

You might also like