Ask HN: Beginner lost in modular airthmetic division Posted by jackallis on Thursday September 13, 2018 @02:52PM from the ask-hn dept. i can't wrap my head around why 3 % 4 =3. Why? somebody please provide explanation that beginner can understand? ( 3 comments | on HN )
5 % 6 = 5
11 % 6 = 5
12 % 6 = 0
13 % 6 = 1
837 % 6 = 3
It’s especially useful for repeating sequences:
> for x in [0, 1, 2, 3, 4]:
> for x in [0, 1, 2, 3, 4, 5]: