당신의 오류와 관련하여 :
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.
이거 때문입니다 range()
기능이 필요합니다 integers
논쟁으로.
당신이 할 때 rheight = height*0.4
, 처럼 0.4
부동 소수점 번호이며, 파이썬/Jython 통역사는 "높이*0.4"도 플로트로 계산합니다. "Rheight"가 플로트가됩니다.
고치다: 당신은 명시 적으로해야합니다 cast
정수로서의 가치 :
rheight = int(height*0.4)