Abstract
The Python programming language is a powerful tool in teaching Number Theory and other pure mathematics classes. Python can be used to make the content more interactive and applicable. I am illustrating this with a few code snippets that I have used in my Number Theory and Cryptography classes.
2020 Mathematics Subject Classification:
Disclosure statement
No potential conflict of interest was reported by the author.
Notes
1 Computer scientists like to start counting with zero. Python follows this philosophy.
2 Users of Python 3.8 or higher can use from math import prod instead.
3 For sake of brevity, we skipped checking that the lists a and m have the same length and that the moduli are pairwise coprime.