Created
May 5, 2020 02:51
-
-
Save ktwrd/e9cf4d12aa8685e0ab716203d0205a1c to your computer and use it in GitHub Desktop.
BMR Calculator for Python3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sex = str(input("[M]ale or [F]emale: ")) | |
weight = int(input("Weight in kg: ")) | |
height = int(input("Height in cm: ")) | |
age = int(input("Age in years: ")) | |
if sex == "m" or sex == "M": | |
formula = 66 + (13.7 * weight) + (5 * height) - (6.8 * age) | |
elif sex == "f" or sex == "F": | |
formula = 655 + (9.6 * weight) + (1.8 * height) - (4.7 * age) | |
else: | |
print("try using your brain next time!") | |
print("BMR: " + str(formula)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment