Hi friends how can I solve this, it is showing me intended block on the word print | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Hi friends how can I solve this, it is showing me intended block on the word print

#your code goes here x=int(input()) y=float(input()) weight=x/y**2 if weight<18: print("small") else: print("high")

12th Nov 2021, 8:42 AM
Emmy Nei-yo 🌍
Emmy Nei-yo  🌍 - avatar
4 Answers
+ 4
The indentation error can occur when the spaces or tabs are not placed properly. All you need to indent the print statements using tab or (4)spaces. If (): print() else: print()
12th Nov 2021, 8:57 AM
Simba
Simba - avatar
+ 3
Nei-yo🌍 Python uses indentation (white space at the beginning of a line) to delimit blocks of code. Depending on program's logic, indentation can be mandatory. so the statements in the if should be indented. if weight < 18: print('' small '') else : print('' high. '')
12th Nov 2021, 9:01 AM
Amine Laaboudi
Amine Laaboudi - avatar
12th Nov 2021, 9:01 AM
Sâñtôsh
Sâñtôsh - avatar
+ 1
Thank you
12th Nov 2021, 10:47 AM
Emmy Nei-yo 🌍
Emmy Nei-yo  🌍 - avatar