Script(Python) error

View: New views
1 Messages — Rating Filter:   Alert me  

Script(Python) error

by Arvind dwarakanath :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello all,

I have just been trying out this python script.I am getting an error.


Title         : 
Parameter list: principal , interest_rate , periods , years         (in block)

Box Area

i = interest_rate / periods
n = periods * years
return ((1 + i) ** n) * principal

Test                   

Parameter               Value
principal                 20000
interest_rate           0.05
periods                    4
years                       20

Run Script

Error Type: TypeError
Error Value: unsupported operand type(s) for /: 'str' and 'str'

What does this error mean ??Does the parameter list assumes values as string??
If so,how to type cast parameters as float,float,int and int respectively??
Or the code/syntax itself is incorrect ?? Please help.

Arvind

_______________________________________________
Gnowsys-help mailing list
Gnowsys-help@...
http://lists.gnu.org/mailman/listinfo/gnowsys-help