Say I want to do something like
9.9 % 13
The normal python modulo will give me an output of 9.9. Are there any modules I can import that will instead give me an output of 6 (or more generally an integer value)?
Say I want to do something like
9.9 % 13
The normal python modulo will give me an output of 9.9. Are there any modules I can import that will instead give me an output of 6 (or more generally an integer value)?
Just do (99 mod 13 * inverse modulo ( 10, 13)) modulo 13
99 mod 13 = 8, inverse modulo (10,13) = 4
9.9 is the only correct answer. Since 9.9 is less than 13, 9.9 is the result of your request. Asking for an import that gives you an integer output is not possible because an integer value is not possible. No matter which module you use.
TL;DR: There are no such modules.