Posted by **sand** on Monday, October 29, 2012 at 11:00pm.

Python 3

For this option, you will first ask "how

many rows?", and get a positive integer from them. Next, you will ask

"how many columns?", and get another positive integer from them. The next step is to ask for an alignment of

each column. They will enter "L", "C", or "R" for each column. You will then accept rows times columns entries

(don't require them to be any particular type). Finally, print out the items into a table such that:

• each column's items aligned as requested – left, center, or right. Fill blanks with the space character.

• a single space, followed by a tab, is the exact distance between a column's longest element and the next

column. Items in a column that are not longest will need extra spacing to achieve identical spacing

between themselves and the next column.

• Right-aligned columns will be just long enough for the longest item, and then all items' last characters will

then have the space and tab after them.

• The last column should have no extra spacing beyond the longest item – each column should thus be the

exact same width, exactly up to the last character requested by the user (e.g., if they left- or center-align,

then the longest item; if they right-align, then all items' last characters).

## Answer This Question

## Related Questions

- Algebra - Find two consecutive positive integers such that the sum of the square...
- Discrete Math - Theorem: For every integer n, if x and y are positive integers ...
- MATH - Find the only positive integer whose cube is the sum of the cubes of ...
- DISCRETE MATHS - We need to show that 4 divides 1-n2 whenever n is an odd ...
- PROGRAMMING - 1. Make a C program that will input two integers and then to enter...
- math, algebra - 2a+2ab+2b I need a lot of help in this one. it says find two ...
- Math - When you add a positive integer and a negative integer, you sometimes get...
- maths - the non- decreasing sequence of odd integers {a1, a2, a3, . . .} = {1,3,...
- algebra - Find two consecutive positive integers such that the sum of their ...
- 7th grade math - The sum of an integer and the next greater integer is at the ...

More Related Questions