doesn't like / as a divide symbol

Jeff Emanuel jeff at advance.com
Thu Oct 28 11:31:51 EDT 1999


battery841 at usa.net wrote:
> 
> I am new to Python.  I am trying to write a program that will do a
> redundant math equation for my science class.  However, when I try to
> run the program, it gives me the following error:
> 
>   File "saturated.py", line 20, in ?
>     PERCENT_SATURATED=SATURATION_ARRAY[count] / MEASURED_ARRAY[count]
> TypeError: bad operand type(s) for /
> 
> I don't get what's wrong with that.  I believe that all my arrays are
> okay.  Any ideas?

Don't believe it, check it.
You could debug by adding these before line 20

  print type(SATURATION_ARRAY[count])
  print type(MEASURED_ARRAY[count])


> 
> Sent via Deja.com http://www.deja.com/
> Before you buy.

-- 

Jeff Emanuel
Landmark Graphics Corporation
jeff at advance.com




More information about the Python-list mailing list