It seems that our current example.py file was written for Python 2, and has not yet been updated to support Python 3. I’ve submitted a pull request to fix that here.
Until that gets merged you can refer to the updated example here.
Note that for new programs that don’t require backwards compatibility with old Python versions, it’s generally better to use f-strings or the .format method instead of modulo-formatting. That could look something like this instead: