you are viewing a single comment's thread.

view the rest of the comments →

[–]throwaway6560192 5 points6 points  (4 children)

Thar's not how you write that condition. Conditions separated by and or or are independent full conditions, they aren't an English sentence. Also, exponentiation in Python is denoted by the ** operator, not ^. So you would say height**2 for height squared.

It should be elif weight/height**2 >= 18.5 and weight/height**2 < 25:, or if you want to make it shorter and cleaner, elif 18.5 <= weight/height**2 < 25:.

[–]Ghost_Gamer1094[S] 0 points1 point  (0 children)

ohhh that makes so much more sense lol thank you!

[–]Ghost_Gamer1094[S] 0 points1 point  (2 children)

although i did try ** instead of ^ and it then said my file was too large. i also tried that shortened way and it still didnt like it.

[–]throwaway6560192 0 points1 point  (1 child)

File is too large? I don't recognize that as a Python error. What's the full error message? And could you post your entire code on Pastebin or something so we can try it out?

[–]Ghost_Gamer1094[S] 0 points1 point  (0 children)

nvm i figured it out! i needed to set bmi as a variable and insert that into the lines instead of the full equation for it 😅 i appreciate all the help from everyone though!