+ 1

What will be the output ?

if 1+1 == 2: if 2*2 == 8: print("if") else: print("else")

29th Dec 2021, 8:22 AM
Shubham Gawai
Shubham Gawai - avatar
4 Answers
+ 3
The output will depend on the level of indentation of the else-part, so check the indentation again
29th Dec 2021, 8:33 AM
Lisa
Lisa - avatar
+ 2
Why not run the code and check it yourself?
29th Dec 2021, 8:27 AM
Lisa
Lisa - avatar
0
In the practice Q the output shown is "else" But, while run in the compiler it shows "no output" quite confusing đŸ€”đŸ€”..
29th Dec 2021, 8:26 AM
Shubham Gawai
Shubham Gawai - avatar
0
The output is else
30th Dec 2021, 2:38 PM
KATE
KATE - avatar