Concernant votre erreur:
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.
C'est parce que le range()
Besoins de fonction integers
comme arguments.
Quand tu fais rheight = height*0.4
, comme 0.4
est un numéro de point flottant, l'interpréteur Python / Jython calcule également "Hight * 0.4" comme flotteur. Résultant en «rhémires» étant un flotteur.
Réparer: vous devez explicitement cast
La valeur comme étant un entier:
rheight = int(height*0.4)