+ 2
Code Coach turns out message that operator and needs two conditions not just one but I thought there are two. Can smb help pls?
I know the code is probably all wrong (I'm a complete newbie) anyway but I'm trying to solve it bit by bit and don't get, why it doesn't accept the second condition. https://code.sololearn.com/ct2Pnvhayx6G/?ref=app
4 odpowiedzi
+ 1
Hi, Sar !
• Don’t print out BMI (first print).
Use elif insted of if after first if, but not on last
• Use else knstead as last if (no condition)
• your condition should looks like this:
elif BMI >= 18.5 and BMI < 25:
(BMI even after and)
+ 1
Thank you so much!
+ 1
Yes, each time you have a comparison you have to tell the computer what two things you’re comparing, also the computer sees it as “<num” and since it only has one thing being compared it can’t do anything but it’s told to do it so it results in error
+ 1
Thank you. Now I know ☺️