+ 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")
3 ответов
+ 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
+ 1
Does It print ''yes'' ?
if 1+1*3==6:
print ('true')
else:
print('false')
try this
Audie
0
awesome got it thanks alot