commit cd6dd2674a19075773eb5faf853e0ec1fd400a58 Author: Ken Schaefer Date: Mon Nov 20 08:45:12 2023 -0600 day 3 diff --git a/day-03/bmi-calculator-2.py b/day-03/bmi-calculator-2.py new file mode 100644 index 0000000..8d66732 --- /dev/null +++ b/day-03/bmi-calculator-2.py @@ -0,0 +1,17 @@ +# Enter your height in meters +height = float(input()) +# Enter your weight in kilograms +weight = int(input()) + +bmi = weight / (height * height) + +if bmi < 18.5: + print(f"Your BMI is {bmi}, you are underweight.") +elif bmi < 25: + print(f"Your BMI is {bmi}, you have a normal weight.") +elif bmi < 30: + print(f"Your BMI is {bmi}, you are slightly overweight.") +elif bmi < 35: + print(f"Your BMI is {bmi}, you are obese.") +else: + print(f"Your BMI is {bmi}, you are clinically obese.") diff --git a/day-03/leap-year.py b/day-03/leap-year.py new file mode 100644 index 0000000..4815550 --- /dev/null +++ b/day-03/leap-year.py @@ -0,0 +1,15 @@ +# Which year do you want to check? +year = int(input()) + +# My solution (same as hers) +if year % 4 == 0: + if year % 100 == 0: + if(year % 400 == 0): + print(f"{year} is a Leap Year") + else: + print(f"{year} is NOT a Leap Year") + else: + print(f"{year} is a Leap Year") +else: + print(f"{year} is NOT a Leap Year") +