Modulus Operator

Description

The code a % b returns the remainder of $a$ divided by $b$.

Sage Cell

Code

r = 14 % 3
r

Options

none

Tags

Primary Tags:
Programming: The Python Language; Arithmetic: Integers; Number Theory: Congruences.

Secondary Tags:
The Python Language: Expressions and operators, Numeric operations;
Integers: Division;
Congruences: Modular Arithmetic.

Related Cells

Attribute

Permalink: http://abstract.ups.edu/aata/integers-sage.html

Author: R. Beezer

Date: 14 Jul 2017 10:23

Submitted by: Tom Judson

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License