% (modulo)
🍕 Remainder left after division
Modulo operator returning division remainder.
中文对照 · Chinese
🍕 分完披萨后剩下的零头
`17 % 5` 等于 `2`(17 除以 5 商 3 余 2),常用来判断奇偶数或周期。
Code example
is_even = (n % 2 == 0)Explore 100 bilingual word cards →
Modulo operator returning division remainder.
🍕 分完披萨后剩下的零头
`17 % 5` 等于 `2`(17 除以 5 商 3 余 2),常用来判断奇偶数或周期。
is_even = (n % 2 == 0)Explore 100 bilingual word cards →