BMI Calculator
Program in Python to compute the BMI of a person and display the risk associated with it by entering the height in ‘m’ and weight in’ kg’. Refer the following table and code accordingly.
Note:
- To calculate the BMI apply the formula: BMI = weight(kg)/( height(m)*height(m) ).
- Result must be adjusted to one decimal place.
- When the height or weight is entered as a negative number or zero, then display the message “Provide a valid input” and stop the program.
BMI | Risk |
27.5 and above | High Risk |
23 – 27.4 | Moderate Risk |
18.5 – 22.9 | Low Risk |
Below 18.5 | Risk of nutritional deficiency diseases |
Sample Input 1:
Enter the weight of the person(kg):85
Enter the height of the person(m):1.75
Sample Output 1:
Your BMI is 27.8 (High Risk).
Sample Input 2:
Enter the weight of the person(kg):0
Enter the height of the person(m):1.58
Sample Output 2:
Provide a valid input
Sample Input 3:
Enter the weight of the person(kg):80
Enter the height of the person(m):-1
Sample Output 3:
Provide a valid input
Code :-
w=int(input("Enter the weight of the person(kg):")) h=float(input("Enter the height of the person(m):")) if w>0 and h>0: b=round((w/(h*h)),1) if b>=27.5: print("Your BMI is "+str(b)+" (High Risk)") elif b>=23 and b<=27.4: print("Your BMI is "+str(b)+" (Moderate Risk)") elif b>=18.5 and b<=22.9: print("Your BMI is "+str(b)+" (Low Risk)") elif b<18.5: print("Your BMI is "+str(b)+" (Risk of nutritional deficiency diseases)") else: print("Provide a valid input")
I look after a vape store directory site and we have had a listing from a vape shop in the United States that additionally advertises CBD items. A Month later on, PayPal has contacted use to claim that our account has been restricted and have requested us to get rid of PayPal as a payment solution from our vape store web directory. We do not offer for sale CBD items such as CBD oil. We only offer promotion and marketing solutions to CBD firms. I have checked out Holland & Barrett– the UK’s Reputable Health Retail store and if you take a close look, you will see that they sell a rather extensive range of CBD product lines, specifically CBD oil and they also happen to accept PayPal as a payment solution. It seems that PayPal is administering twos sets of rules to different firms. As a result of this limitation, I can no longer take PayPal on my CBD-related website. This has restrained my payment choices and currently, I am heavily dependent on Cryptocurrency payments and direct bank transfers. I have checked with a solicitor from a Magic Circle law practice in The city of london and they said that what PayPal is undertaking is totally illegal and discriminatory as it should be applying a systematic benchmark to all companies. I am yet to seek advice from a different attorney from a US law firm in London to see what PayPal’s legal position is in the USA. In the meantime, I would be very appreciative if anybody here at targetdomain could offer me with substitute payment processors/merchants that work with CBD firms.
Good Afternoon everyone , we are presently taking on new reviewers who would like to taste and write about our CBD range including CBD TERPENES. If this is of interest to you please feel free to reach out to me on http://rubylithcms.com
Hi friends, its wonderful post about educationand completely explained, keep it up all the
time.
Hi, yup this piece of writing is truly fastidious and I have learned lot of things from it concerning blogging.
thanks.
Enter the odds in your preferred format and instantaneously
view how they are converted into other well-known forms.
Appreciate this post. Let me try it out.
Hi, the whole thing is going nicely here and ofcourse every one is sharing
facts, that’s truly fine, keep up writing.
I really like reading a post that can make people think.
Also, thank you for allowing for me to comment!
This piece of writing offers clear idea for the new users of blogging, that genuinely how
to do blogging.
Woah! I’m really enjoying the template/theme of this blog.
It’s simple, yet effective. A lot of times it’s
challenging to get that “perfect balance” between user friendliness and visual appeal.
I must say that you’ve done a fantastic job with this.
Additionally, the blog loads super fast for me on Firefox.
Superb Blog!
This baccarat betting strategy is also identified as
Hoyle’s Press and a couple of other names.
Wonderful, what a web site it is! This webpage provides valuable data to us, keep it up.
Fantastic web site. A lot of useful information here.
I’m sending it to some pals ans additionally sharing in delicious.
And naturally, thank you on your effort!
I am really impressed with your writing skills as well as with the layout on your blog.
Is this a paid theme or did you customize it yourself?
Either way keep up the excellent quality writing, it is rare to see a
nice blog like this one these days.
Livescores are kept with complete match history, like reside stats, match commentary, and odds movement.
You can attain them telephonically, via e mail, or
reside chat.
My family members all the time say that I am killing my time here at web, however I know I am getting
experience all the time by reading such good articles or reviews.
Do you have a spam issue on this site; I also am a blogger, and I
was wondering your situation; many of us have created
some nice practices and we are looking to exchange methods with others, be sure to shoot me an e-mail if interested.