# Python for Data Science | NPTEL | Week 1 Assignment 1 Solutions

This set of MCQ(multiple choice questions) focuses on the Python for Data Science NPTEL Week 1 Assignment 1 Solutions.

You should practice these questions to improve fundamentals of Data Science needed for various interviews (like company interview, campus interview, walk-in interview), entrance exams, placements and other competitive exams. All the questions in this particular section are based on only “Python for Data Science NPTEL Week 1 Assignment 1 Solutions“.

### Course layout

Week 1: Basics of Python Spyder
Week 2: Sequence data types & associated operations
Week 3: Data frames
Week 4: Case study

NOTE: You can check your answer immediately by clicking show answer button. Moreover, this set of “Python for Data Science NPTEL Week 1 Assignment 1 Solution” contains 10 questions.

Now, start attempting the quiz.

### Python for Data Science NPTEL Week 1 Assignment 1 Solutions

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

a) *
b) –
c) +
d) All of the above

Q2. When the following statement is executed, what type of error is obtained?
var@check1 = 10

a) Type Error
b) Syntax Error
c) Value Error
d) None of the above

Q3. Two variables X and 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) X, Y = Y, X

Q4. From the following set of statements, what will be the value of variable y in the final print statement?
y = 1**2**3**2
print(“Variable y:”, y)

a) 8
b) 9
c) 1
d) Error
e) 16

Python for Data Science NPTEL Week 1 Assignment 1 Solutions

Q5. Consider j = 5 and k = 11. We change the values from j = 7 and k remains constant.
What is print(j|k) before and after modification of value in variable j?

a) 3, 15
b) 15, 15
c) 11, 15
d) 15, 7
e) None of the above

Q6. What would be the output of the following statements?
log_exp = not not True and False or not False
print(log_exp)

a) False
b) True
c) Not True
d) None of the above

Q7. What does k = 4%7 evaluate to and what is the type of variable k?

a) 4, int
b) 0.0, float
c) 0, int
d) 1, int
e) None of the above

Python for Data Science NPTEL Week 1 Assignment 1 Solutions

Q8. j = 6 and g = 3.3. If normal division and floor division was done between j and k, what would be the type of the resultant variable?

a) int ,int
b) float, float
c) float, int
d) int, float
e) None of the above

Q9. Consider two answers to a question; answer1 and answer2. What is the output of the following set of statements?

a) True
b) False
c) 0
d) 1

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

``````1. print("Good", end = "")
print("Day")
Output -> GoodDay

2. word1 = "Trial"
print("Word is %s" %word1)
Output -> Trial

3. num1 = 23
print(" Number: %f" %num1)
Output -> Number: 23.000000

go``````

a) 4
b) 2
c) 1, 3, 4
d) 3, 4
e) All are correct

Python for Data Science NPTEL Week 1 Assignment 1 Solutions

>> Next- Python for Data Science Week 2 Assignment Solutions

Programming in Java NPTEL week 1 quiz answers

Nptel – Deep Learning assignment solutions

The above question set contains all the correct answers. But in any case, you find any typographical, grammatical or any other error in our site then kindly inform us. Donâ€™t forget to provide the appropriate URL along with error description. So that we can easily correct it.