Jibran Khan sᴜᴊᴀɴ.ᴇ.s. Pls avoid answering with finished code. Remember this is a learning app. We have to help others to know how to solve problems - if we solve for them, there's no learning.
Prefer giving hints the OP can follow and find the solution.
Here is the correct code for it
weight = int(input());
height = float(input());
x = weight/float(height*height);
if x < 18.5:
if x>=18.5 and x<25:
if x >= 25 and x < 30:
if x >= 30: