Friday
July 25, 2014

Homework Help: computer science

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

First Name:
School Subject:
Answer:

Related Questions

Algebra - Need to get these checked-- 33. What is the area of a square with the ...
maths - a matrix X has a+b rows and a+2 columns while the matrix Y has b+1 rows ...
chemistry - Which of the following os a true statement about the periodic table...
comp.sci-python - For this option, first ask the user what the maximum number of...
Maths - Please Could someone tell me what: 1. A square number is 2. A cube ...
Parent - Mr Mike plants cabbages in a square grid so that the number of rows and...
software - What does this mean: "Using the columns feature,select the question ...
math - Is it possible to arrange the integers from 1 to 240 in a table with 15 ...
physical science - displays in formation in rows and columns
math - Mr. Tip is working on the marching band's halftime show. During the first...

Search
Members