NPTEL Programming Data Structures And Algorithms Using Python Assignment 2 Answers 2022

NPTEL Programming Data Structures And Algorithms Using Python Assignment 2

NPTEL Programming Data Structures And Algorithms Using Python ASSIGNMENT 2 Answers:- Hello students in this article we are going to share NPTEL Programming Data Structures And Algorithms Using Python assignment week 2 answers. All the Answers provided below to help the students as a reference, You must submit your assignment at your own knowledge.

Below you can find NPTEL Programming Data Structures And Algorithms Using Python Assignment 2 Answers

Assignment No.Answers
Programming Data Structures And Algorithms Using Python Assignment 1 Click Here
Programming Data Structures And Algorithms Using Python Assignment 2 Click Here
Programming Data Structures And Algorithms Using Python Assignment 3 Click Here
Programming Data Structures And Algorithms Using Python Assignment 4 Click Here
Programming Data Structures And Algorithms Using Python Assignment 5 Click Here
Programming Data Structures And Algorithms Using Python Assignment 6 Click Here
Programming Data Structures And Algorithms Using Python Assignment 7 Click Here
Programming Data Structures And Algorithms Using Python Assignment 8 Click Here

NPTEL Programming Data Structures And Algorithms Using Python Assignment 2 Answers 2022:-

Q1. One of the following 10 statements generates an error. Which one? (Your answer should be a number between 1 and 10.)

x = [[3,5],"mimsy",2,"borogove",1]  # Statement 1
y = x[0:50]                          # Statement 2
z = y                                # Statement 3
w = x                                # Statement 4
x[1] = x[1][:5] + 'ery'              # Statement 5
y[1] = 4                             # Statement 6
w[1][:3] = 'fea'                     # Statement 7
z[4] = 42                            # Statement 8
x[0][0] = 5555                       # Statement 9
a = (x[3][1] == 1)                   # Statement 10

Answers:- 7

Q2. Consider the following lines of Python code.

Which of the following holds at the end of this code?

b = [43,99,65,105,4]
a = b[2:]
d = b[1:]
c = b
d[1] = 95
b[2] = 47
c[3] = 73

Answers:- c – a[0] == 65, b[3] == 73, c[3] == 73, d[1] == 95

For week 2 programming assignment click here

Q3. What is the value of endmsg after executing the following lines?

startmsg = "anaconda"
endmsg = ""
for i in range(1,1+len(startmsg)):
  endmsg = endmsg + startmsg[-i]

Answers:- ‘anaconda’

Next Week Assignment Answers

quizxp telegram

Q4. What is the value of mylist after the following lines are executed?

def mystery(l):
  l = l[2:]
  return(l)

mylist = [7,11,13,17,19,21]
mystery(mylist)

Answers:-

For Internship and job updates:- Visit

Disclaimer: We do not claim 100% surety of answers, these answers are based on our sole knowledge, and by posting these answers we are just trying to help students, so we urge do your assignment on your own.

if you have any suggestions then comment below or contact us at [email protected]

If you found this article Interesting and helpful, don’t forget to share it with your friends to get this information.