Creates a grid-matrix of cells, Computer Engineering

Assignment Help:

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'])]


Related Discussions:- Creates a grid-matrix of cells

Where telephone traffic is measured, Telephone Traffic is measured in ...

Telephone Traffic is measured in (A)  Seconds.  (B)  Hours. (C)  Erlang       (D)  Pulses per minute. Ans: Telephone Traffic is measured in Erlang.

E-recruitment system, This project is aimed at developing a web-based and c...

This project is aimed at developing a web-based and central recruitment Process system. this web site is for Fresher candidates who graduated. Some features of this system will be

Explain cache memory, What is cache memory? It is a small, fast memory ...

What is cache memory? It is a small, fast memory that is inserted among large, slower main memory and the processor. It decreases the memory access time

C program, program to find minimum total number of shelfs

program to find minimum total number of shelfs

Don''t care states, The conflict between too hot and too cold or too slow a...

The conflict between too hot and too cold or too slow and too fast can be resolved using don't care states. Don't care states are used when i) the state of the output is not

What are the benefits of web-based spreadsheets, What are the Benefits of W...

What are the Benefits of Web-Based Spreadsheets? The spreadsheets can be accessed from any Internet-connected computer, not just the computer originally formed the spreadsh

Bounded rationality in decision making, Q.What do you mean by the term 'bou...

Q.What do you mean by the term 'bounded rationality in decision making'? Maximizing the outcomes of a decision is an ideal stage. Habitually it is an impossible thing. The caus

What is known as multiphase clocking, What is known as multiphase clocking?...

What is known as multiphase clocking? When edge-triggered flip flops are not used, two or more clock signals may be required to guarantee proper transfer of data. This is calle

Describe about micro-controllers, Q. Describe about Micro-controllers? ...

Q. Describe about Micro-controllers? Micro-controllers: These are a specialized device controlling computer which comprises every function of computers on a single chip. Chip

Face scanning security system - biometric, Face Scanning Security System - ...

Face Scanning Security System - Biometric Computer Security Systems Finally, face scanning security system are also one of biometric technologies. Generally, the principle of

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd