please answer only if you know and answer all of them pleaseʕっ•ᴥ•ʔっ
Answers
Solution:
Question 1.
= (3 * 5) + 7
= 15 + 7
= 22
According to PEDMAS rule, Bracket operation is performed first. So, 3 * 5 becomes 15 and then addition is performed. So, 15 + 7 becomes 22.
Question 2.
= (8 + 2) ** 3
= (10) ** 3
= 10 * 10 * 10
= 1000
Again, we are solving brackets first. 8 + 2 becomes 10 and it is raised to the power 3 to get 100. Operation a ** b is same as a raised to the power b.
Question 3.
= 17 // (13 + 4)
= 17 // 17
= 1
The operation inside bracket is performed first. So, 13 + 4 becomes 17. Now, 17 is divided by 17 (integer division) to get the quotient as 1. If it were 17 / 17 then the result is 1.0
a // b operation returns the quotient obtained after integer division.
Question 4.
56 * (9 / 3)
= 56 * 3.0
= 168.0
In Python, the result becomes float after division. So, 9 / 3 becomes 3.0 and not 3 after division which is then multiplied with 56 to get 168.0
Question 5.
((12 * 3) + 5)
= (36 + 5)
= 41
Asterisk is used when we want to perform multiplication. Product of 12 and 3 is 36. 36 is added to 5 to get 41.
Answer:
- 22
- 1000
- 1
- 168.0
- 41