0
I need help in Python for Beginners
I CANT SEEM TO FIND THE SOLUTION FOR THE BMI CALCULATOR. SORRY IF EVERYTHING IS IN CAPSLOCK.
11 Antworten
+ 7
∆BH∆Y is right (except you don't need parentheses around height**2 because exponentiation is evaluated before division)
+ 1
not everything is capslock: question title and tag are not... so you don't have any excuse for that... (and even all caps, that's not a good excuse at all... how could you code if you have capslock blocked ^^)
+ 1
ty but it says that there is a syntax error in where it says elif bmi >= 18.5 and < 25
+ 1
Thank you guys all so much for helping me!
+ 1
George
You just have to add the same variable to second condition after the 'and'.
For Example:
🔹elif bmi >= 18.5 and < 25:
# Should Be
🔹elif bmi >= 18.5 and bmi < 25:
________________________________
weight = int(input())
height = float(input())
bmi = weight / height**2
if bmi < 18.5:
print("Underweight")
elif bmi >= 18.5 and bmi < 25:
primt("Normal")
elif bmi >= 25 and bmi < 30:
print("Overweight")
else bmi >= 30:
print("Obesity")
________________________________
0
for some reason when i wrote the body of my question everything was capitalised
0
ok
weight = input(int())
height = input(float())
bmi = weight / height**2
if bmi < 18.5:
print("Underweight")
elif bmi >= 18.5 and < 25:
primt("Normal")
elif bmi >= 25 and < 30:
print("Overweight")
else bmi >= 30:
print("Obesity")
0
ok ill take a look at it
0
Help the python ??
No one likes homework, but your math teacher has given you an assignment to find the sum of the first N numbers.
Let’s save some time by creating a program to do the calculation for you!
Take a number N as input and output the sum of all numbers from 1 to N (including N).
Sample Input
100
Sample Output
5050
Explanation: The sum of all numbers from 1 to 100 is equal to 5050
- 2
Help plis