+ 3
Can I perform the floor division and modulo operators at the same time?
2 Respuestas
+ 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
0
If yes then how?