+ 2

Code

if 1 + 1 == 2: if 2 * 2 == 8: print("if") else: print("else") why else? 1+1==2 so should print "if"

20th Feb 2018, 7:10 AM
Jordan
Jordan  - avatar
1 Answer
+ 5
it is setup incorrectly. try putting the print statement under the first if statement. then you need a print statement for your other if statement. the else is fine. I am a Java guy though
20th Feb 2018, 7:17 AM
Tim Millar
Tim Millar - avatar