You are on page 1of 2

G H Patel College of Engineering and Technology

Department of Computer Engineering


A.Y. 2022-23(ODD), SEMESTER 5
SUBJECT CODE: 102045603
SUBJECT NAME: PYTHON FOR DATA SCIENCE
ASSIGNMENT 1

1. Explain built-in data types of python.

What is a list in Python? Differentiate it with tuple. Explain slicing and striding with
2.
suitable example.

3. How can a map be used in a Python program? Explain with a suitable example.

Write a Python program to remove the first occurrence of a specified element from an
4.
array.

Write a Python program to search a specific value from a given list of values using binary
5.
search method.

Write a function that takes in a string and uses a list comprehension to return all the
6.
vowels in the string

Iterate a given list and Check if a given element already exists in a dictionary as a key’s
7.
value if not delete it from the list

What will be the output of following code:

nums=[1,2,5,10,3,100,9,24]

for i in nums:
8.
if i<5:

nums.remove(i)

nums

9. What is the pass statement in Python?


10. What is a docstring? Explain with suitable example.

You might also like