+ 3

Help me to solve the code #0005

can somebody explain it step by step. https://code.sololearn.com/c4wR3AALOJ8a/?ref=app

21st Mar 2018, 12:19 AM
Pradipsinh Jadeja
Pradipsinh Jadeja - avatar
2 Answers
+ 3
Call the function by fun(1, 2, 3, 4, 5, 6) with: a = 1, b = 2, c = 3, d = 4, e = 5, f = 6 because of definition of fun(a, b, c, d, e, f). Calculate a * b - c / d + e % f by filling in the values: 1 * 2 - 3 / 4 + 5 % 6, and performing the multiplication and division pieces: 1 * 2 = 2, 3 / 4 = .75, 5 % 6 = 5, leaving: 2 - .75 + 5 = 1.25 + 5 = 6.25. return 6.25 from fun. print the 6.25.
21st Mar 2018, 1:08 AM
John Wells
John Wells - avatar
+ 17
1 * 2 = 2 3 / 4 = 0.75 5 % 6 = 5 2 - 0.75 + 5 = 6.25
21st Mar 2018, 12:59 AM
Vukan
Vukan - avatar