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

Answer: b) –

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

Answer: b) Syntax Error

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

Answer: c) 1

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

Answer: b) 15, 15

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

Answer: b) True

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

Answer: a) 4, int

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

Answer: b) float, float

Q9. Consider two answers to a question; answer1 and answer2. What is the output of the following set of statements?
answer1 = True
answer2 = False
print(answer1 * answer2)

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

Answer: c) 0

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

4. print("ready\nsteady\ngo")
   Output -> ready
             steady
             go

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

Answer: b) 2

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.

Thanks in advance.

For discussion about any question, join the below comment section. And get the solution of your query. Also, try to share your thoughts about the topics covered in this particular quiz.

Leave a Comment

Your email address will not be published. Required fields are marked *