Mar-08-2018, 07:30 PM
Please do not post images. Refer to the Help document on BBCode for instructions on how to properly post code, errors and output. It would also be helpful if you post one or two lines of the file you are reading from.
The error is telling you it cannot convert the string "Pencil" into a number. Are you remembering that lists start with 0 and not 1?
Prior to doing any calculations use print statements to see what values words[1], words[3] and words[4] actually contain.
The error is telling you it cannot convert the string "Pencil" into a number. Are you remembering that lists start with 0 and not 1?
Prior to doing any calculations use print statements to see what values words[1], words[3] and words[4] actually contain.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition