There are basic mistake,you try using float value in range(number_of_rotation_1). number_of_rotation_1 is set to float in line before. So if route route("/start-admission" even run you should get TypeError.