Assessment 2: Decision Making

These assessments will be focused on performing mathematical calculations on grids. Why grids? I hope you have fun with these problems and view them as puzzles. Remember, if you're stuck for more than 20 minutes on a homework problem such as these, post a message to Piazza (and see the questions and answers there while you wait for a response)! We love to answer questions on Piazza!
Instructions

This assessment is designed to be completed in fifty minutes or less. Your code must work on any valid inputs to receive credit.

Complete the template below such that you will provide code to solve the following problem. When you are satisfied with your solution, you should upload your solution, you should upload it to Blackboard. Each assessment comes with test cases that you can run before submitting your assignment, so you know how you're doing on it.

Imagine that the user specifies with width and height of a grid, and provides a tile in that grid. You will write code to determine if the tile is in the "first loop" next to the edge of the grid. For example, in the following 5x10 gird,


the yellow tiles are in the "first loop" next to the edge of the grid. In another example, in this 9x10 grid, the yellow tiles similarly represent tiles in the "first loop":

Similarly, in a 3x3 grid, the center tile, 5, is considered to be in the "first loop".

Your code should return "yes" or "no" depending on whether the provided tile is inside the "first loop" or not. Any tile along an outer edge of a grid cannot be in its "first loop".

You may use the following formulas in your solution as needed:

row = (tile - 1) / width


Code Template and Test cases

Download the code template.