+ 2

please explain ----> if 1 + 1 * 3 == 6: print("Yes") else: print("No")

hey all im sure this is a math question what is the order of operation here ? this would print ("NO")

14th Apr 2020, 2:59 PM
Audie
3 Respostas
+ 2
PEMDAS P = Parenthesis E = Exponent M = Multiplication D = Division A = Addition S = Subtraction Now let's solve your expression : 1 + 1 * 3 =? using PEMDAS, we need to multiply first since Multiplication(M) comes first in PEMDAS than Addition(A), 1 * 3 = 3 - - - - - > (a) 1 + (1*3) = 1 + 3 using(a) = 4
14th Apr 2020, 3:19 PM
minirkk
minirkk - avatar
+ 1
Does It print ''yes'' ? if 1+1*3==6: print ('true') else: print('false') try this Audie
14th Apr 2020, 3:03 PM
iren yeger
iren yeger - avatar
0
awesome got it thanks alot
14th Apr 2020, 3:23 PM
Audie