- 1
num = 12 if num > 5: print("Bigger than 5") if num <=47: print("Between 5 and 47")
Bro how is possible
5 Réponses
+ 2
It's print both. Because 12 is greater than 5 and also less than 47.
+ 2
In simple you can also rewrite your code as below
num = 12
if num > 5 and num <=47:
    print("Bigger than 5")
    print("Between 5 and 47")
+ 1
It's a nested if statement.  In the true case of first statement the second statement runs.
If first statement is false than the second statement didn't run.
+ 1
Exactly what answer you need? Related to condition or output mention what output you need
- 1
bharathi = 10
if bharathi < 5:
	print("tamil")
	if bharathi <= 10:
	print("hello")
Bro

![0_O-[Mägár_Sám_Äkà_Nüllpøïntêr_Èxëcéptïön]~~ - avatar](https://blob.sololearn.com/avatars/43b6f011-92b0-4c6a-b525-2ca9ad75c809.jpg)




