Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

modulo

What is the result of % in Python?

August 21, 2022 by Magenaut

What does the % in a calculation? I can’t seem to work out what it does.

Categories Python, Q&A Tags modulo, operators, python, python-2.7, syntax Leave a comment

How do you check whether a number is divisible by another number?

August 20, 2022 by Magenaut

I need to test whether each number from 1 to 1000 is a multiple of 3 or a multiple of 5. The way I thought I’d do this would be to divide the number by 3, and if the result is an integer then it would be a multiple of 3. Same with 5.

Categories Python, Q&A Tags integer, modulo, python Leave a comment

What does the percentage sign mean in Python

August 19, 2022 by Magenaut

In the tutorial there is an example for finding prime numbers:

Categories Python, Q&A Tags modulo, operators, python Leave a comment

Python modulo on floats

August 19, 2022 by Magenaut

Can anyone explain how the modulo operator works in Python?
I cannot understand why 3.5 % 0.1 = 0.1.

Categories Python, Q&A Tags modulo, python Leave a comment

C and Python – different behaviour of the modulo (%) operation

August 18, 2022 by Magenaut

I have found that the same mod operation produces different results depending on what language is being used.

Categories Python, Q&A Tags c#, math, modulo, python Leave a comment

Integer division & modulo operation with negative operands in Python

August 14, 2022 by Magenaut

Questions arise when I type in these expressions to Python 3.3.0

Categories Python, Q&A Tags integer-division, modulo, negative-number, operand, python Leave a comment
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress