I have dout some to clear me this | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

I have dout some to clear me this

if 1 + 1 >= 2: print("false") elif 2 * 2 == 4: print("true") but the output is false

21st Sep 2018, 1:31 PM
Pretty Boy
Pretty Boy - avatar
3 Answers
+ 4
Pretty Boy Seeing your problem was resolved already it would be great if you can mark the answer that you find useful to encourage the community to help each other out. 😉
21st Sep 2018, 2:37 PM
Zephyr Koo
Zephyr Koo - avatar
+ 2
well 1 + 1 is bigger or equal to two, so false is printed. because an elif statement can only run if the first one wasn't run, there's no other output
21st Sep 2018, 1:42 PM
hinanawi
hinanawi - avatar
+ 1
tq
21st Sep 2018, 2:12 PM
Pretty Boy
Pretty Boy - avatar