[Tutor] Patchwork Help

Alan Gauld alan.gauld at btinternet.com
Mon Nov 25 19:15:10 CET 2013


On 25/11/13 15:54, Callum Wilson wrote:
> Hi,
> I am a relatively beginner to python. I am currently studying Digital
> Forensics at University

I have no idea what Digital Forensics might be but I assume that part is 
not pertinent to the actual question below so I'll ignore it for now! :-)

> I have to complete a worksheet for Friday 29th, but i am having trouble
> in doing this and wanted to seek external help.

Thanks for telling us its homework.
We can help but won;t do it for you.

> I have to create a patchwork of which begins by prompting user to enter:
> the patchwork size (common width & height in terms of patches)
> the desired 3 colours (of which my program should ensure are all
> different from eachother).

OK, That is fairly easy so far. Prompt the user for some input
and read it. Do you know how to do that bit? Then you have to validate 
the colours to ensure they are different. Can you do that bit?

The hard bit is, I suspect the creating the patchwork?
That will require a table data structure - probably a two dimensional 
list. Do you know how to create a table?

You then need to populate the table with colours - are there any
rules about which colours can be next to each other?

Finally you need to display it. This could be a simple text output
or it could be a graphic - how clever do you need to get?

How much of the above can you do? Which bits do you need help with?


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos



More information about the Tutor mailing list