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.
position
type
index
number
Answers
Answered by
6
Answer:
It will raise a Type error
Explanation:
for accessing a list we use indexing and those are to be in integer form not float.
example:
Correct:
l=[1,3,5,7]
l[1:2]
output:
3
Incorrect:
l=[1,3,5,7]
l[1.0]
output:
type error
Answered by
1
Answer:
type error is the answer
Similar questions