If statement Help on inside IF

Hi, i need to how to make the if statement of inside if. Incase 1st if condition as true it need to enter or else need to proceed on the last else. I tried to explain on my Python code below. I don’t know how to implement this on ob2. If anyone can pls help on it

var = 1000
if var < 200:
   print "Expression value is less than 200"
   if var == 150:
      print "Which is 150"
      print "Which is not 150"
   print "More thaan 200"

print "Good bye!"

More thaan 200
Good bye!

This was python code. unfortunately idk the two if shows error . I need to achieve the output what i showed . Anyway to do on loli. Or only way to use interpreter ??

Also write the code you used on ob, then i can edit to rectify it