modular arithmetic python tutorial - Search