project 3 working with matrices (more details are given the docx file)
$2-8 USD / oră
Project 3: Working with matrices
Project due date: October 20th 11:59PM
This is an individual project
Set Up
Create a folder called project3 in the CS177 folder you created in lab1.
You can do this using any Windows machine in the B160 or G066 laboratories. You can do this also by logging into your UNIX CS account and typing the following commands:
cd CS177
mkdir project3
If you want to use your PC/MAC to develop and/or turn-in your project, please see how to do that here: Guide to working from home (prelabs and projects only)
Objectives
Learn how to navigate matrices using for loops
Learn how to check the type of a Python variable
Practice string methods
Project Description
When dealing with matrices, its often needed to explore all the elements adjacent to a given one. Given an element matrix[i][j], the set of elements that are the adjacent to it are those having row index and column index in the range:
i-1 to i+1
j-1 to j+1
Note that we include the element itself in the set of adjacent elements.
When finding the neighbors, of course care must be taken when dealing with elements at the “border” of the matrix. Look at the following examples. The first example depicts the neighbors of the matrix element having value 0 (the one having row 0 and column 0 as indexes).
The second example depicts the neighbors of the matrix element having value 30 (the one having row 2 and column 3 as indexes).
Hence the row and column indexes must be “adjusted” consequently.
The “exploration” of the neighbors of a given element is an essential component of several games (for example, Minesweeper or Battleship).
In this project, you have to write functions that scan the elements of a matrix and that explore the neighbors of matrix elements.
To begin, create a file called [url removed, login to view] under the project3 folder.
# print (list(range(1,10)))
ID Proiect: #5024437
Detalii despre proiect
Acordat lui:
Hi Sir. I'm expert in Python programming, and I'll do this task for You without problems. I've done lot of similar jobs, and this could be done in 1 day. Best regards, Fejs.
5 freelanceri plasează o ofertă medie de 6$/oră pentru proiect
Hi, I would be glad to help you.I have the necessary expertise, you can check my profile for feed-back. Regards
i can help you with this project. but i have a few questions about how you are going to store matrices if u want we can disscuss them.