Someone should tell me what's wrong with this code, I've tried but itz not going through | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 1

Someone should tell me what's wrong with this code, I've tried but itz not going through

height= float(input('What is your height?: ')) weight= float(input('What is your weight?: ')) bmi= weight/(height**2) print("Your BMI is" bmi) if bmi<15.5: print('No offense, but you probably anorexic') elif bmi<27.5: print('You maintain your body, Weldone') else: print('I ain't gonna go easy on, \nyou are fat')

23rd Dec 2018, 6:03 PM
Black
2 ответов
+ 7
I see two errors: print('YourBMI is', bmi) # it needs a comma to separate values. print("I ain't gonna go easy on you, \nyou are fat") # it needs double quotes because you use a single quote inside the string.
23rd Dec 2018, 6:18 PM
Paul
Paul - avatar
0
Thanks man
24th Dec 2018, 6:41 AM
Black