[Tutorial]CREATING A BMI CALCULATOR TO DETERMINE IF A MAN IS OVERWEIGHT OR NOT

in #utopian-io6 years ago (edited)

images (1).png
IMAGE SOURCE
RESPOSITORY: PYTHON, OPEN SOURCE RESPOSITORY
WHAT YOU WILL LEARN:

  • WHAT IS A BMI
  • WHAT A BMI CALCULATOR IS
  • FORMULA FOR SOLVING BMI
  • CODING A BMI CALCULATOR TO DETERMINE IF A MAN IS OVERWEIGHT

REQUIREMENTS:

  • A COMPUTER SYSTEM/ PC/ SMARTPHONE
  • PYTHON SOFTWARE

DIFFICULTY: BASIC

CONTENTS
WHAT IS BMI: BMI simply stands for BODY MASS INDEX.

WHAT A BMI CALCULATOR IS: A BMI calculator is a calculator that is ised to detect if a man is overweight through his/her weight and height.

FORMULA FOR SOLVING BMI: The formula is kg/m² where by kg is a persons weight in kilogram and m² is a person height squared.

CODING A BMI CALCULATOR: Coding a BMI calculator is simply done by the steps below:
IF NOT OVERWEIGHT:

name = "Kenechukwu"
height_m = 3
weight_kg = 20




bmi = weight_kg / (height_m ** 2)
print("bmi: ")
print(bmi)
if bmi < 25:
    print(name)
    print("is not overweight")
else:
    print(name)
    print("is overweight")

OUTPUT: Screenshot_QPython3_20180812-123359.png

This code is assigned to calculate a subject "Kenechukwu" to calculate his bmi and determine if he is overweight or not.
A man is labelled overweight if his BMI is 25 or more. The code below shows our subject is not over weight now ill re-write the code to make our subject overweight and see
IF OVERWEIGHT:

name = "Kenechukwu"
height_m = 1
weight_kg = 500




bmi = weight_kg / (height_m ** 2)
print("bmi: ")
print(bmi)
if bmi < 25:
    print(name)
    print("is not overweight")
else:
    print(name)
    print("is overweight")

Screenshot_QPython3_20180812-124056.png

As you can see the bmi has been determined and clearly our subject is overweight.
PROOF OF WORK
My other tutorials include:

Sort:  

I thank you for your contribution. Here are my thoughts;

  • Tutorials should teach the user something unique, shouldn't show ubiquitous content-creation and replicate concepts which can be found over the internet with great ease. What you've shown in your tutorial can be described as "Mathematical Operations and Conditionals in Python with BMI Calculator Example", which meets my statement at above.

  • Your tutorial is very messy. The main reason behind that is formatting. I highly suggest you to use code blocks to show code, instead of plain text. That helps readability. If you don't know how to use code blocks, you can use the Markdown Styling Guide.

  • The volume of your tutorial is too sparse. It is preferable to have substantial concepts up to 4-5.


Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Thanks for the corrections ill take note of it on my next post

Thank you for your review, @yokunjon!

So far this week you've reviewed 1 contributions. Keep up the good work!

Congratulations! This post has been upvoted from the communal account, @minnowsupport, by kenechukwu2 from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, someguy123, neoxian, followbtcnews, and netuoso. The goal is to help Steemit grow by supporting Minnows. Please find us at the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.

If you would like to delegate to the Minnow Support Project you can do so by clicking on the following links: 50SP, 100SP, 250SP, 500SP, 1000SP, 5000SP.
Be sure to leave at least 50SP undelegated on your account.

Congratulations @kenechukwu2! You have completed the following achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:
SteemitBoard and the Veterans on Steemit - The First Community Badge.

Do you like SteemitBoard's project? Then Vote for its witness and get one more award!

Coin Marketplace

STEEM 0.35
TRX 0.12
JST 0.040
BTC 70351.33
ETH 3563.43
USDT 1.00
SBD 4.72