Skip to content
← Back to Community
BMI Calculator
Profile icon
tsana

An easy way to find out if you are overweight or not
Please upvote

Voters
Profile icon
MarianaGonzal22
Profile icon
FitsumBeshah
Profile icon
Billytsana
Profile icon
UltraPhoenix10
Profile icon
BobTheTomatoPie
Profile icon
ErikHurinek
Profile icon
Ph03nix
Profile icon
ClementBowe
Profile icon
22zachf
Profile icon
Bookie0
Comments
hotnewtop
Profile icon
Aqtion

Cool, maybe you could add the customary system too like ask the user, customary or metric, i think that would be super nice. other than that awesome!

Profile icon
[deleted]

lol i am 14.74435196195006

Profile icon
Aqtion

I really like the idea, but there seems to be something wrong with the calculation aspect. For testing purposes, I put 3 as my height and 102 as my weight, but the program said I was not overweight, and my bmi was 11. Again, it was probably just a typo or some miscalc in the code, otherwise awesome program!

Profile icon
ErikHurinek

@kbadrinath_tcsp The algorithm seems fine to me. The height is in metres so to be 3m tall and weigh 102kg is actually underweight.

Profile icon
tsana

@ErikHurinek I hope u liked it pls upvote thanks for the support

Profile icon
Aqtion

I did not realize the height was in meters! @ErikHurinek

Profile icon
Jakman

good but this program could have taken much less lines to make. still good.

Profile icon
ErikHurinek

Nice, but there is some unnecessary assignment of variables E.g:

print('Please enter your height')
height_m=input()
height_m=float(height_m)

can simply be chained into one line:

height_m=float(input('Please enter your height'))

Profile icon
tsana
Profile icon
Aqtion

this may have been addressed earlier but instead of doing print("blah blah"), and then name = input() under u could just do name=input("blah blah")

Also is having a bmi of 3 bad

Profile icon
tsana

@kbadrinath_tcsp Thanks

Profile icon
LizFoster

@kbadrinath_tcsp A BMI of 3 means that something has probably gone very wrong in the code, as anything below 18.5 is underweight. 0~0

Profile icon
Bookie0

Nice I ain’t fat. Tip: you should specify if it’s in cm or kg, just so that the user isn’t confused
Otherwise I like it

Profile icon
tsana
Profile icon
CodingGoose

Cool! I'm not overweight!

Profile icon
tsana

@DannyIsCoding Check out my cazino game

Profile icon
CodingGoose
Profile icon
kingretracted

A lot of this can become smaller and better looking code. First for all your input's, you put a print before it but the input() will say a message inside the (). Ex: input("Your name is?") would ask me "Your name is?". Another is on line 5, you rewrote the value of the variable but you can do that in 1 line because input() returns and float() too. You could of done "height_m = float(input())" and the same thing with line 8. Anyways it was neat.

Profile icon
tsana

@kingretracted Thanks because I am a baginner and I need help

Profile icon
tsana

@kingretracted check out my cazino game

Profile icon
CodingCactus

? didn't let me input anything but my name

Profile icon
tsana

@CodingCactus Sorry I will fix it.Also I really admire u and and pls visit my profile again

Profile icon
tsana

@CodingCactus now it is fixed

Profile icon
CodingCactus

@tsana what units is the height in?

Profile icon
tsana
Profile icon
CodingCactus

@tsana ok, then you will want the height variable to be a float, not an int (line5)

Profile icon
tsana

@CodingCactus Thanks did u like it?

Profile icon
CodingCactus
Profile icon
tsana

@CodingCactus check out my cazino game