Skip to content Skip to sidebar Skip to footer
Blogger Jateng

How to create a BMI calculator in Python | 2018 - update 2020

How to create a BMI calculator in Python | 2018 - update 2020



Hey people welcome and today in this video we'll see how to make a BMI calculator in python easily in few steps. ---------------------------------------------------------------------------------------------------------- See our other videos !! How to Enable Windows 10’s Hidden Dark Theme https://www.youtube.com/watch?v=X41BW... How to use ...

This Video Published Since or about 5 months ago ago, Hosted by youtube.com and Published by Channel: Captain TechWorld

How to create a BMI calculator in Python | 2018's Video From Captain TechWorld have lenght about 6:28 and was viewed more than 245 and is still growing

The program calculates an individual's BMI from the load and height supplied using the user's input. However, after I enter 'metric' or 'imperial' and press enter, the program closes. the primary three print functions work fine and anything after doesn't appear after me pressing the enter button. How do I fix this?

print('\t\t\t BMI Calculator')
print('\t\t\t By Abdinasir Hussein')
print('\n Hello, this is a BMI Calculator!')

input('Do you wish to enter metric units or imperial units: ')

while input == 'metric':
    height = float(input('Please enter your height input meters(decimals): '))
    weight = int(input('Please enter your weight input kg: '))
    bmi = weight/(height*height)

    if bmi <= 18.5:
        print('Your BMI is', bmi,'which means you are underweight.')

    elif bmi > 18.5 and bmi < 25:
        print('Your BMI is', bmi,'which means you are normal.')

    elif bmi > 25 and bmi < 30:
        print('your BMI is', bmi,'overweight.')

    elif bmi > 30:
        print('Your BMI is', bmi,'which means you are obese.')

    else:
        print('There is an error with your input')
        print('Please check you have entered whole numbers\n'
              'and decimals were asked.')

while input == 'imperial':
    height = int(input('Please enter your height input inputches(whole number): '))
    weight = int(input('Please enter your weight input pounds(whole number): '))
    bmi = (weight*703)/(height*height)

    if bmi <= 18.5:
        print('Your BMI is', bmi,'which means you are underweight.')

    elif bmi > 18.5 and bmi < 25:
        print('Your BMI is', bmi,'which means you are normal.')

    elif bmi > 25 and bmi < 30:
        print('Your BMI is', bmi,'which means you are overweight')

    elif bmi > 30:
        print('Your BMI is', bmi,'which means you are obese.')

    else:
        print('There is an error with your input')
        print('Please check you have entered whole numbers\n'
              'and decimals were asked.')

input('\n\nPlease press enter to exit.')
 
I've now changed it, but how do I'm going about editing this block:
input = input('Do you wish to enter metric units or imperial units: ')

if input == 'metric':
    height = float(input('Please enter your height input meters(decimals): '))
    weight = int(input('Please enter your weight input kg: '))
    bmi = weight/(height*height)

    if bmi <= 18.5:
        print('Your BMI is', bmi,'which means you are underweight.')

    elif bmi > 18.5 and bmi < 25:
        print('Your BMI is', bmi,'which means you are normal.')

    elif bmi > 25 and bmi < 30:
        print('your BMI is', bmi,'overweight.')

    elif bmi > 30:
        print('Your BMI is', bmi,'which means you are obese.')

    else:
        print('There is an error with you inputput')
        print('Please check you have entered whole numbers\n'
              'and decimals where asked.')

Related Video with How to create a BMI calculator in Python | 2018

BMI Calculator & Calendar 2016 in a pen Stand as the best New Year gift

BMI Calculator & Calendar 2016 in a pen Stand as the best New Year gift
This Creative & Innovative Concept is an Informative & Rotational Pen Stand. Body Mass Index along with Monthly Calendar for 2016 is designed in a product which is the best advertising gift.
This Video Published Since 3 years ago ago, Hosted by youtube.com and Published by Channel: Nourishable

BMI Calculator & Calendar 2016 in a pen Stand as the best New Year gift's Video From Pearl Mechaplast have lenght about 00:34 and was viewed more than 256 and is still growing


Body Mass Index: Use and Misuse of BMI

Body Mass Index: Use and Misuse of BMI
BMI is used as an indicator of body fat to assess disease risk. While it is very convenient to measure, there are several caveats when using BMI, especially at the individual level. BMI doesn't account for body composition, body fat distribution and differences in ethnicities. Waist circumference is a more direct measure of central obesity ...

This Video Published Since 1 year ago ago, Hosted by youtube.com and Published by Channel: Nourishable

Body Mass Index: Use and Misuse of BMI's Video From Nourishable have lenght about 4:42 and was viewed more than 425 and is still growing


BMI+ Calculator Tutorial

BMI+ Calculator Tutorial
BMI+ Calculator--Have an ideal weight. How to use BMI+ Calculator? Enter your weight, hight, sex, age and know your ideal weight according to many different indicators and formulas: Bernhard, Brock, Halls, Lorenz or Potton/Taton formulas. Moreover, BMI+ Calculator lets you calculate your WHtR--Waist-to-Heigth Ratio and WHR--Waist-Hip Ratio. It ...

This Video Published Since 4 years ago ago, Hosted by youtube.com and Published by Channel: AppReal Net

BMI+ Calculator Tutorial's Video From AppReal Net have lenght about 1:16 and was viewed more than 369 and is still growing


COMPLETE BODY COMPOSITION SERIES PART-2| BMI, BMR, METABOLIC AGE| 100% NATURAL | MOTIVATION[HINDI]

COMPLETE BODY COMPOSITION SERIES PART-2| BMI, BMR, METABOLIC AGE| 100% NATURAL | MOTIVATION[HINDI]
Namshkar dosto ye hai hamara body composition series part-2 is ke madhyam se ham janenge total body composition ,matlab bmi ,bmr,metabolic age ,body fat , muscle , bones me puri jankari or iss jankari ke madhyam se aap aapke sports,bodybuilding,health ,fitness etc ke goal easily track kar payenge

This Video Published Since 1 year ago ago, Hosted by youtube.com and Published by Channel: RK HEALTH SCIENCE

COMPLETE BODY COMPOSITION SERIES PART-2| BMI, BMR, METABOLIC AGE| 100% NATURAL | MOTIVATION[HINDI]'s Video From RK HEALTH SCIENCE have lenght about 6:07 and was viewed more than 290 and is still growing

1 comment for "How to create a BMI calculator in Python | 2018 - update 2020"

  1. Here is my favourite BMI calculator. This calculator help you in calculating your health and fitness.

    ReplyDelete