TypeError: 'float' object is not subscriptable

@rmwkwok you are passing in wx a float and not an interable

this is the error:

TypeError                                 Traceback (most recent call last)
Cell In[2], line 2
      1 wx = 1.0
----> 2 w[0]

TypeError: 'float' object is not subscriptable

Hi @Darvin_Cotrina,

You had posted this in others’ thread, so I have moved your post to a new thread. Please share the course name, week number, and assignment name we are discussing.

Also, what question do you have?



Were you trying to show an example which can trigger that error message?


Maybe I’m not expressing myself correctly, but the only thing I did is respond to an error that causes the error 'float' object is not subscriptable

Hello @Darvin_Cotrina

I see. Thank you for your post and your continued participation in the community :wink: For the that you originally replied to, I was looking for the full error traceback to see exactly how it occured. The code shared there was not consistent with the original version of the lab.

Thank you again :wink: