Q. Evaluate the following expressions manually:
(i) (2+3) **3-6/2
(ii) (2 + 3)* 5 // 4 + (4 + 6) / 2
(iii) 12 + (3 * 4 - 6) / 3
(iv) 12 + (3 * 4 - 6) // 2
(v) 12 * 3 % 5 + 2 * 6 // 4
(vi) 12 % 5 * 3 + (2 * 6) // 4
Answer :-
i = 122.0
Explanation :-
(2+3) **3-6/2
5**3-6/2
125-3.0
122.0
125-3.0
122.0
ii = 11.0
Explanation :-
(2 + 3)* 5 // 4 + (4 + 6) / 2
5 * 5 // 4 + 10/ 2
25 // 4 + 5.0
6 + 5.0
5 * 5 // 4 + 10/ 2
25 // 4 + 5.0
6 + 5.0
11.0
iii = 14.0
Explanation:-
12 + (3 * 4 - 6) / 3
12 + ( 12 - 6 ) / 3
12 + 6 / 3
12 + 2.0
12 + ( 12 - 6 ) / 3
12 + 6 / 3
12 + 2.0
14.0
iv = 15
Explanation :-
12 + (3 * 4 - 6) // 2
12 + (12 - 6) // 2
12 + 6 // 2
12 + 3
15
12 + (12 - 6) // 2
12 + 6 // 2
12 + 3
15
v = 4
Explanation :-
12 * 3 % 5 + 2 * 6 // 4
36 % 5 + 12 // 4
1 + 3
4
36 % 5 + 12 // 4
1 + 3
4
vi = 9
Explanation :-
12 % 5 * 3 + (2 * 6) // 4
12 % 5 * 3 + 12 // 4
2 * 3 + 3
6 + 3
9
12 % 5 * 3 + 12 // 4
2 * 3 + 3
6 + 3
9
Plz explain it how didi 14 came in 3 part
ReplyDeleteAt first solve value of () backet that * then - then / then +.
Deleteplz explain how to do 5 part
ReplyDelete12 * 3 % 5 + 2 * 6 // 4
Delete36 % 5 + 12 // 4
1 + 3
4
Pls tell how to solve part 4
ReplyDeleteOk. : )
DeletePls tell how to do 6
ReplyDeleteOk : )
Deletethx
ReplyDeleteit is helpfull for me
why
ReplyDeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )