[Tutor] Filling an array - with a twist

Phil phillor9 at gmail.com
Wed Nov 11 05:10:11 EST 2020


On 11/11/20 7:45 pm, Alan Gauld via Tutor wrote:

> Checking that columns don't repeat is a whole extra level
> of complexity! You need a nested loop and check the current
> index against the previous two rows at the same position.
> I'd definitely hide that in a function...
>
> def validate(item, row, index, theList)

Thank you Alan for your suggestions. I'll continue to muddle on, 
however, I was hoping that this problem might be common and have a 
clever solution.

So far, I search each row for and error and correct it with a random 
number. Of course this can create another error in the same row or a new 
error in a column. Testing and correcting  could continue for a long time.

-- 

Regards,
Phil



More information about the Tutor mailing list