[Tutor] Fwd: Python bingo game.

Danny Yoo dyoo at hashcollision.org
Mon Mar 31 21:49:20 CEST 2014


>> Can some one help me with displaying a matrix vertically.
>>
>> For example my output matrix is:-
>>
>> [1 2 5 7 9]
>> [25 67 78 23 34]
>> [33 22 66 88 98]
>> [32 31 41 56 78]
>> [21 34 58 99 76]
>>
>> And i want my matrix to look like this:-
>> [1 25 33 32 21]
>> [2 67 22 31 34]
>> [5 78 66 41 58]
>> [7 23 88 56 99]
>> [9 34 98 78 76]


You have described the "matrix transpose" problem, which is fairly
standard homework as an introductory list-processing exercise.

Your comment about PyDev and Eclipse is technically irrelevant, so we
have to ignore that part of your question.  Why should it matter what
your program is written in, as long as it's a program?

What difficulty are you having?  I need to be straightforward so that
you understand, without ambiguity: we do not do your homework.  We
will not violate the honor code of your institution.  To do so is
anathema to why folks here volunteer to help beginners.


We will be happy to help with coding questions or techniques.  In some
cases, we'll also try to help present problem solving techniques.

Have you done a problem that has any similarity to the problem you're
tackling now?  Have you written functions that work on matrices
before?

Do you have any smaller test cases?  Starting on the 5x5 case is
large.  Have you considered smaller cases like the 1x1 and 2x2
matrices?  Are your matrices always square?

What is the representation of your data?  What is the type of your
input?  Can you describe it precisely?  What is the type of your
output?  Can you describe it precisely?


More information about the Tutor mailing list