I found a plugin for adding Python code to my posts. It’s called WP-SynHighlight. I’m not sure it works well with my theme, though. Here is an example:
- # produce a multiplication table with the number of rows and columns defined by the user
- columns = int(raw_input("Input the number of columns: "))
- rows = int(raw_input("Input the number of rows: "))
- longest = len(str(columns * rows)) # find out how many digits are needed for rjust() to format table evenly
- for table in range (1, rows+1):
- for table2 in range (1, columns+1):
- result = table * table2
- print str(result).rjust(longest),
- print
Some of the code is white on a white background. Now I need to figure out how to change that background or change the color of the text.



