Computer Science, asked by jananicharles, 11 months ago

one of the following 10 statements generates an error. Which one?
x = [1,"abcd",2,"efgh",[3,4]] # Statement 1
y = x[0:50] # Statement 2
z = y # Statement 3
w = x # Statement 4
x[1] = x[1] + 'd' # Statement 5
x[1][1] = 'y' # Statement 6
y[2] = 4 # Statement 7
z[0] = 0 # Statement 8
w[4][0] = 1000 # Statement 9
a = (x[4][1] == 4) # Statement 10


nitish8089: topic...
nitish8089: of question..
nitish8089: python...
jananicharles: These Statements are written on python. If it is python what would be the Answer

Answers

Answered by MrCoder
5
Statement 1 makes error if the language is java or any language that does not support multiple datss in an array

jananicharles: These Statements are written on python. If it is python what would be the Answer MrCoder?
MrCoder: is every statement diffrent or part of the code?
jananicharles: These statements are part of code...
MrCoder: then it should be statement 2 or statement 10
Answered by aqibkincsem
3

It is given that from the given ten statements, one generates an error. Statement 6 from the 10 statement has an error.

In the situation of options, where we talk about options that generate an error when the statements are used as codes in Python, the statement 6 will generate an error for sure.

Similar questions