`python` may mean "Python 2" on some systems and "Python 3" on others. Your program seems to assume Python 2 so you may have to change this to `python2`. Alternatively, you can add the following line after line 7:
```
from __future__ import print_function
```
and then use `print` as a function everywhere, i.e. wrap what is printed in parentheses. That would make your program compatible with both Python 2 and Python 3.