Hi, I am brand new to programming all together and was kind of thrown into a programming class without much help and I have struggled with my homework for this week. I have to create a code to write an ASCII table using Python 2.6 . Here is the actual problem that I was assigned:

PROBLEM 1 (35 points) Write a Python program that will produce the following ASCII Table. Be sure that
the heading is centered compared to the table. Be sure to use the center string method and also
Python’s formatting strings to get the table.
ASCII TABLE
-----+------+-----+---+-----+---+-----+---+
0 | CTRL | 32 | | 64 | @ | 96 | ` |
-----+------+-----+---+-----+---+-----+---+
1 | CTRL | 33 | ! | 65 | A | 97 | a |
-----+------+-----+---+-----+---+-----+---+
2 | CTRL | 34 | " | 66 | B | 98 | b |
-----+------+-----+---+-----+---+-----+---+
3 | CTRL | 35 | # | 67 | C | 99 | c |
-----+------+-----+---+-----+---+-----+---+
4 | CTRL | 36 | $ | 68 | D | 100 | d |
-----+------+-----+---+-----+---+-----+---+
5 | CTRL | 37 | % | 69 | E | 101 | e |

And obviously it has to be the full ASCII table in a chart that looks like this. I have code for the chart but I just don't know how to insert the data into it. Please help.

Recommended Answers

All 2 Replies

show us what you have so far.

I have code for the chart but I just don't know how to insert the data into it.

ASCII "data" is just integers from 0-255

commented: true +13
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.