[Solved] : Question 134851

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

x = [“slithy”,[7,10,12],2,”tove”,1] # Statement 1
y = x[0:50] # Statement 2
z = y # Statement 3
w = x # Statement 4
x[0] = x[0][:5] + ‘ery’ # Statement 5
y[2] = 4 # Statement 6
z[4] = 42 # Statement 7
w[0][:3] = ‘fea’ # Statement 8
x[1][0] = 5555 # Statement 9
a = (x[4][1] == 1) # Statement 10

Consider the following lines of Python code.

b = [23,44,87,100]
a = b[1:]
d = b[2:]
c = b
d[0] = 97
c[2] = 77


Expert Answer


Answer to : Question 134851

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us

× How can I help you?