How its answer is 10.0 please tell me with the full process | Sololearn: Learn to code for FREE!

0

How its answer is 10.0 please tell me with the full process

print((5 * ((25 % 13) + 100) / (2 * 13)) // 2)

5 Answers

New Answer

+3

25%13=12 12+100=112 equation is now simplified to , (5*112/(2*13)) //2 2*13=26, equation is now as follow, (5*112/26) //2 112/26=4.307.. 5*4.307=21.5384.. 21.5384//2=10.0 ,"//" is a floor division operator that will round off to a whole number which is less than normal division result , i.e. 10.7692 is round off to 10.0

+2

First the inner paranthesis will be calculated first. (25%13)+100 = 12+100 = 112 2*13=26 ((25%13)+100 )/(2*13) = 112/26= 4.30 ((25%13)+100 )/(2*13)//2 = 2.0 The operator // is floor division and it will always ignore the decimal part in the output.. (5*((25%13)+100 )/(2*13)//2)=5*2.0 =10.0

+2

Print ((5*((25%13)+100)/(2*13))//2) ((5*(12+100)/26)//2) ((5*112/26)//2) (21.53//2) 10.0, "//"operater ignore decimal part

+2

Follow BODMAS RULE FIRST CONSIDER BRACKETS (25%13)=12 THEN ADD 100 TO IT 12+100=112 THEN (2*13)=26 THEN DIVISON 112/26=4.30 THEN FLOOR DIVISON 4.30//2=2.0 THEN WE ARE LEFT WITH MULTIPLICATION 5*2.0=10.0 .

+1

सुमित भण्डारी #How its answer is 10.0 please tell me with the full process print ((5 * ((25 % 13) + 100) / (2 * 13)) // 2) print ((5 * (12 + 100) / 26) // 2) print ((5 * 112 / 26) // 2) print ((560 / 26) // 2) print (21.538 // 2) # // is known as floor division so output will be 10.0