NPTEL Python For Data Science Assignment 1 Answers 2023

NPTEL Python For Data Science Assignment 1 Answers 2023:- If you are searching for answers of NPTEL Python For Data Science Assignment 1 Answers 2023 then you are at the right place.

NPTEL Python For Data Science Assignment 1 Answers 2023

1. Which of the following is/are the correct ways of naming variables in Python?

a. 2_max = 5
b. max_2 = 5
c. max2 = 5
d. max @2 = 5

Answer:- B, C

2. What does 5%11 will evaluate to

a. 1
b. 5
c. 0
d. Syntax error

Answer:- B

3. What does 4//7 evaluate to

a. 0
b. 1
c. 0.0
d. 4

Answer:- A

4.What will be the output of the following code snippet?
num_1= ‘100
num_2 = ‘200
print(num_1 + num_2)


A. 300
B. 100200
C. ‘100’ + ‘200’
D. ‘100 + 200’

Answer:- B

5.What will be the output of the following code snippet?

num_1= ‘100
num_2 = ‘200
print(num_1 + num_2)

num_1 = int (num_1)
num_2 = int (num_2)
print(num_1 + num_2)

A. 300
B. 100200
C. ‘100’ + ‘200’
D. ‘100 + 200’

Answer:- A

6. What is the type of the following expression? 1 + 4 / 2

A. int
B. float
C. bool
D. str

Answer:- B

7. What is the type of the following expression?
NPTEL Python For Data Science Assignment 1 Answers 2023

A. str
B. bool
C. True
D. False

Answer:- C

8. What is the output of the following code snippet?
NPTEL Python For Data Science Assignment 1 Answers 2023

A. 32
B. 44
C. 40
D. 36

Answer:- C

9. Which of the arithmetic operators given below cannot be used with ‘strings’ in Python?

A. *
B. –
C. +
D. All of the above

Answer:- B

10. Consider the list of instructions and resulting outputs given below. Pick the set that is incorrect.

NPTEL Python For Data Science Assignment 1 Answers 2023
A. 4
B. 2
C. 1, 3
D. 1, 3, 4
E. All are correct

Answer:- B

11. Two variables Xand Y were assigned the following values initially: X = 3 and Y = 6. Which of the following statements will help swap the values between these two variables?

A. Y = X
X = Y
B. X = Y
C. X = Y
Y = X
D. X, Y = Y, X

Answer:- D

Leave a Comment