Con respecto a su error:
The error was: 1st arg can't be coerced to int
Inappropriate argument type.
An attempt was made to call a function with a parameter of an invalid type.
This means that you did something such as trying to pass a string to a method
that is expecting an integer.
Esto es porque el range()
necesidades de funciones integers
como argumentos.
Cuando tu lo hagas rheight = height*0.4
, como 0.4
es un número de punto flotante, el intérprete Python/Jython calcula "altura*0.4" como flotante también. Resultando en que "Rheight" sea un flotador.
Arreglar: tienes que explícitamente cast
el valor como un entero:
rheight = int(height*0.4)