Exercise 2 - Following the Clues Using your treasure map script and start at (1.1). Use the output clues as input and re
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Exercise 2 - Following the Clues Using your treasure map script and start at (1.1). Use the output clues as input and re
ise 1: Find the Treasure Part 1 the structure below (a treasure map) +- 34 21 32 41 25 +----+-- +-- -+----+- 14 42 43 14 31 +----+-- -+----+----+- | 54 45 52 42 23 +----+----+----+----+- 33 15 51 31 35 +----+----+----+----+- +- 21 52 33 13 23 घ
loads/Lab04-TH%20(1).ipynb elp nb X Lab03.ipynb X Lab03-TH.ip X I C▸ Markdown Lab04.ipynb X Labe O Eventually we will write a program to explore the above matrix for a trea Each cell in the matrix contains an integer between 11 and 55; for each v the cell containing the next clue. For example starting in the upper left corner (at row = 1,column = 1), use 43. Move to (4,2), which contains 15, and so on. The treasure is a cell whose value is the same as its coordinates. The program must eventually read in the treasure map data into a 5 by 5 a found the treasure. The "Treasure Hunt Problem" is from the HackerRank.com avaiable at https:/ ]: # script to generate the treasure map (do not modify) treasuremap = [] # empty list to store row, column information treasuremap.append([34,21,32,41,25]) # first row of the map treasuremap.append([14,42,43,14,31]) # second row of the map treasuremap.append([54,45,52,42,23])# third row of the map fourth row of the map treasuremap.append([33,15,51,31,35])# treasuremap.append([21,52,33,13,23])# fifth row of the map