+ 4

# 1+1*3==6. Is it yes or no. Someone help me

16th Jan 2017, 6:42 AM
seetha
+ 24
no 1*3=3 1+3=4
16th Jan 2017, 6:47 AM
Frost
+ 12
* has higher precedence, so the answer is 4.
16th Jan 2017, 6:48 AM
Karl T.
+ 7
Explanation : The Answer is No. Just always remember the law of PEMDAS P = Parenthesis E = Exponent M = Multiply D = Divide A = Add S = Subtract the logic on the computer always do the PEMDAS,or it start from the Left to right, or PARENTHESIS to SUBTRACT,,,. so the question is "why 1+1*3 is not equal to 6" the answer is, 3*1 = 3, then 3 + 1 = 4. The multiply is always the first before the addition.
17th Jan 2017, 10:18 AM
Darwin Fegarido
+ 4
now I got it 1+1*3==6 1+3==6 4==6 False
17th Jan 2017, 4:53 AM
Ajay Agrawal
+ 3
it's a no
16th Jan 2017, 6:45 AM
Amir Haghani
+ 3
thank qew sid
16th Jan 2017, 6:48 AM
seetha
+ 2
no it is prints False I have tried it on sololearn python. i don't understand why it is printing that because their is 1 also so it has to print "1 or true" atleast
17th Jan 2017, 4:43 AM
Ajay Agrawal
+ 2
Helioform, what about == operator? I think it's priority is more than * operator.
17th Jan 2017, 4:52 AM
Ajay Agrawal
+ 2
1×3=3 3+1=4 no
24th Jan 2017, 3:56 PM
박정호
+ 1
I've written some code in code playground that helps explain answer to this and also covers how you can help figure out stuff like this, and how you can make the code do the addition first. I use comments (bits of text that are ignored by python, so that humans can put notes in the code for humans to read) in the code to explain everything, so read everything in there and then run it http://www.sololearn.com/app/python/playground/cpFOz8t1ZE2G/
17th Jan 2017, 2:13 PM
Phil
+ 1
it will be "No" as == has higher producer value then * or + so if 1+1 * 3==6: ###(false) ###(it is false because, interpreter will first execute == , in case it is false, it neglect the + and * operator;) print("Yes") ###(the if statement will get terminated and execute else statement) else: print("No") ###(so, no will be shown on screen)
1st Oct 2020, 6:18 PM
0
No
18th Jan 2017, 4:14 AM
Ishwor Subedi
0
It is definitely "No" because at this point the lesson teaches that "==" has a higher precedence than "or". So if you do the math you'll see that the calculation is 1+1*3==6 --> 4==6 (which is False), this means that the "else" statement will be printed. You can try it in Code playground or in Python IDE if you're using a computer. Good luck!
18th Jan 2017, 8:06 PM
Hakob Baghdasaryan
0
no
25th Jan 2017, 4:53 PM
maharjan
0
It would be false because multiplication comes before adding. Try putting 1 + 1 in parenthesis and then run it. It should print True.
1st Mar 2017, 3:14 AM
Garrison
0
(1+1)*3=6 1+(1*3)=3 u should define brackets to get correct solution
18th Aug 2017, 7:32 PM
Harish Perni
- 3
how.. 6==6.. its yes only know
16th Jan 2017, 6:46 AM
seetha
- 3
Yes its right according synergy
17th Jan 2017, 12:05 PM
Rock star