what is the solution >>> 7%(5 // 2) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

what is the solution >>> 7%(5 // 2)

please help me & show me the steps thenk you

5th Jul 2017, 5:15 PM
aksas abdesselam
aksas abdesselam - avatar
5 Answers
+ 12
Before of all, let's solve the calculation in parenthesis: 5//2 = 2 From Stack - [ ... In Python 3, they made the / operator do a floating-point division, and added the // operator to do integer division ] Now... the exercise will be: 7 % 2 Modulo gives the remainder of a division, so... 7 % 2 = 1 Full Exercise: 7 % ( 5 // 2 ) 7 % ( 2 ) 1
5th Jul 2017, 5:58 PM
Maz
Maz - avatar
+ 1
It's 1. 2 goes into 5 two times (5//2) disregard any float numbers. Then you get 7%2. So this is asking for the remainder. So in 7%2, 2 goes into 7 three times, leaving one as the remainder to make 7. That 1 is your answer.
21st Jul 2017, 5:52 AM
Smith
Smith - avatar
0
7 % 2 = 1
12th Jul 2017, 1:26 PM
Андрей Бушин
Андрей Бушин - avatar
0
как 7 % 2 = 1 ?? нифига не пойму
21st Jul 2017, 5:27 AM
Anatoliy
0
thanks 👌🏻🙈
21st Jul 2017, 6:04 AM
Anatoliy