0

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.

3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by woooee
1

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

Votes + Comments
true
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.