How to make code examples accessible in a document?

I'm creating a MS Word document (and will probably convert it to PDF later on) for a visually impaired programming student.

I'm following all the guidelines about text semantics, like correctly using headers, paragraph, tables, avoiding blank lines, etc. But I don't know what to do when it comes to code examples. I'm particularly using Python for this document, so not only there are code snippets but also interpreter examples, including the ">>>" symbols. What's the best way to add these in my document? Should I enclose these examples in a table containing just one cell, and then adding a title to the table along the lines of "this is a code example:"? Should I add line numbers? Any other markup that I should add?