learn python with minesweeper || Algorithm for Python Jobs

preview_player
Показать описание
Adding another array - a 2d array problem to our python job interview algorithms you should be able to do and understand.

All the best to my fellow coders out there - learning their way.

Keep coding - never stop. Soon it will be the only applicable commodity on this tiny planet of ours.
Рекомендации по теме
Комментарии
Автор

This was an excellent video because you have clearly communicated the logic behind the task in a way that I have been able to grasp. I was able to complete my task on a Python course as a result of watching your walkthrough. I had the same difficulty as your mentioned student, because I could not visualise what was happening so I appreciate your explanation and drawing out the logic path on your tablet & stepping through the code. Your concise code is also easier to comprehend and I have a bit more confidence about understanding 'list comprehension' as a result. Thanks

geuvfjaide
Автор

To avoid chaining all of those test conditions when iterating over the 3x3 local matrix, you can just use a try and except block. If the current cell is out of range, no problem (except for -1 indexing since that's valid in Python).

hovhadovah
Автор

This video is amazing. Truly a hidden gem.

weilinzou
Автор

I found this really helpful, so thank you! However, I am now wondering how you draw the matrix with the boxes for the numbers? I'm trying to create a python program to draw a train cart with numbers in it (aka like a table/matrix that has rows and columns), but I'm not sure how to draw it in my program. Thank you for this video!

sandralarsson
Автор

wow i wish i found this last year when i needed it ..thanks

markcaruana
Автор

what you did in one line took me twenty to change the values of adjacent cells.

lokeshchandak
Автор

Adam Kap
1 second ago
The piece of code:

row_range = range(bomb_row - 1, bomb_row + 2 )
col_range = range(bomb_col - 1, bomb_col + 2 )

how did you know to use -1 and 2 ? Other numbers still make the range of 3

adamk
welcome to shbcf.ru