New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BMI algorithm raise ZeroDivisionError #40

Closed
anselmos opened this Issue May 13, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@anselmos
Copy link
Owner

anselmos commented May 13, 2017

Setting height lower then 100 makes this error:

bikingendorphines/web/models.py", line 29, in bmi
    return self.weight / ((self.height * self.height) / 10000)
ZeroDivisionError: integer division or modulo by zero

@anselmos anselmos added the bug label May 13, 2017

@anselmos anselmos added this to the Python milestone milestone May 21, 2017

@anselmos anselmos self-assigned this May 23, 2017

anselmos added a commit that referenced this issue May 23, 2017

Fixes #40.
Fixes failing test for ZeroDivisionError and other tests that have not used float-rounding but int's

@anselmos anselmos closed this in 8e38729 May 23, 2017

@anselmos anselmos removed the in-progress label May 24, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment