This has nothing to do with the modulo operation. The interactive interpreter will be divided into each 2nd command invoked .
An OS update of 10.9 (Mavericks) caused instability in some versions of Python. To fix this problem, download and run the patch through the terminal:
>>> curl -O http://bugs.python.org/file32324/patch_readline_issue_18458.sh
>>> openssl sha1 patch_readline_issue_18458.sh
>>> sh ./patch_readline_issue_18458.sh
Python , Mavericks. https://www.python.org/downloads/
Hyperboreus .