Creates a grid-matrix of cells, Computer Engineering

1. Write the function makegrid. This function accepts a width and height and creates a grid/matrix of cells. The width gives the number of columns and the height the number of rows of the grid that should be created.

e.g. >>> makegrid(4,5)

[('cell', (0, 0), ['t', 'b', 'r', 'l']), ('cell', (0, 1),['t', 'b', 'r', 'l']), ('cell', (0, 2), ['t', 'b', 'r', 'l']),

('cell', (0, 3), ['t', 'b', 'r', 'l']), ('cell', (0, 4), ['t','b', 'r', 'l']), ('cell', (1, 0),['t', 'b', 'r', 'l']),

('cell', (1, 1), ['t', 'b', 'r', 'l']), ('cell', (1, 2), ['t','b', 'r', 'l']), ('cell',(1, 3), ['t', 'b', 'r', 'l']),

('cell', (1, 4), ['t', 'b', 'r', 'l']), ('cell', (2, 0), ['t','b', 'r', 'l']), ('cell', (2, 1), ['t', 'b', 'r', 'l']),

('cell', (2, 2), ['t', 'b', 'r', 'l']), ('cell', (2, 3), ['t','b','r', 'l']), ('cell', (2, 4), ['t', 'b', 'r', 'l']),

('cell', (3, 0), ['t', 'b', 'r', 'l']), ('cell', (3, 1),['t','b', 'r', 'l']), ('cell', (3, 2), ['t', 'b', 'r', 'l']),

('cell', (3, 3), ['t', 'b', 'r', 'l']), ('cell',(3, 4), ['t','b', 'r', 'l'])]

Posted Date: 3/4/2013 7:33:40 AM | Location : United States







Related Discussions:- Creates a grid-matrix of cells, Assignment Help, Ask Question on Creates a grid-matrix of cells, Get Answer, Expert's Help, Creates a grid-matrix of cells Discussions

Write discussion on Creates a grid-matrix of cells
Your posts are moderated
Related Questions
For F = A.B.C + B.C.D ‾ + A‾.B.C ,  write  the  truth  table and simplify using Karnaugh map . And. Simplification of Logic Function F = A B C + B C‾ D + A‾ B C. Therefore the

Q. What is Program Annotation Packages? A quite renowned scheme in this field is OpenMP a newly designed industry standard for shared memory programming on architectures with u

Layout pages, can describe sections, which can then be overridden by particular views making use of the layout. Major and overriding sections is optional.

Translator for low level programming language were termed as? Ans. Translator for low level programming language is called as Assembler.

Q. Explain about Memory Buffer Register? Memory Buffer Register (MBR): It's a register that comprises the data to be written in memory (write operation) or it obtains the data

E ngaged tone is generated in the: (A)  Telephone instrument of calling subscriber (B)  Telephone instrument of called subscriber (C)  Exchange (D)  Repeater

Ask question #MinimYour professor wants you to fill a two-dimensional N by N matrix with some numbers by following a specific pattern. According to his explanation as in the figure

XML is the Extensible Markup Language. It betters the functionality of the Web by letting you recognize your information in a more accurate, flexible, and adaptable way. It is e

Add a byte number from one memory location to a byte from subsequent memory location and put sum in the third memory location. Also save carry flag in the least significant bit of

Explain the need for user-defined functions. The need for user-defined function: 1.  A programmer might be having a block of code that he has repeated forty times all over t