Computer Science, asked by singhkusum6336, 4 months ago

When you try to use the float data type in a Python program to access an element in a list, it will raise the
error.
O position
O type
O index
O number​

Answers

Answered by adityakumar170700
1

Answer:

number is the correct answer

Answered by dreamrob
0

Answer:

If we try to execute the following program:

list = [1, 4, 10, 14]

print(list[2.0])

Then we will get an error:

TypeError: list indices must be integers or slices, not float

This is because we can use integer type of value to access any element in a list and not float type.

So, it will raise the error, which is TypeError because of improper use of the data type

Therefore, the correct option is type.

Similar questions