top of page
learn_data_science.jpg

Data Scientist Program

 

Free Online Data Science Training for Complete Beginners.
 


No prior coding knowledge required!

Writer's pictureRinchen Dorji

BMI CALCULATOR

Body mass index calculator for human, this body mass index calculator ensures how healthy a person is, and take immediate reaction if a person in unhealthy by calculating their BMI.

first we take input weight and height, then and calculate BMI with below formula.

BMI=weight/(height/100)**2

If BMI is less than equal to 18.4 that means a person is unhealthy or under weight, if BMI is less than or equal to 24.9 that means person is fit or healthy, and same for BMI 29.9, 34.9 and 39.9. if BMI is not less than or equal to 39.9 and above category then that means person is severely obese and goes to else statement.



PRIME NUMBER CHECKER

Using if else statement, any number can be checked for prime or not prime number, prime number is greater than one that is its positive number so using for loop the i ranges from 2 till one less than entered number. Now using if statement, if number modulo i and reminder is zero its not prime, condition will run form 2 to (number-1), check for all number less than given number and if reminder is not equal to 0 then it can be prime number and lastly if number is less than 1 it will directly go to last else statement and print its not prime number.












0 comments

Recent Posts

See All

Comentarios


bottom of page