+ 3

Can I perform the floor division and modulo operators at the same time?

20th May 2020, 4:09 PM
Newday Motivation
Newday Motivation - avatar
2 Réponses
+ 10
If you are talking from python - Yes, you can do it with divmod(): res = divmod(13,5) # result is a tuple (2,3) 2 is quotient, 3 is remainder #or quo, rem = divmod(13,5) # result are 2 variables quo is quotient, rem is remainder
20th May 2020, 4:33 PM
Lothar
Lothar - avatar
0
If yes then how?
20th May 2020, 4:09 PM
Newday Motivation
Newday Motivation - avatar