Use Python 2.7
During his completely miserable life, pirate Abraham Blaufelthas been in search of the lost treasure of Atlantis. On a veryfortunate day in the year of the Lord 1642 he enters an abandonedcathedral of a long gone sect in the ancient forests of Poland.Inside he finds a mysterious ancient parchment. The parchmentreads:
Abraham Blaufelt immediately knew what he was dealing with. Apuzzle of which the result is a safe route to the treasure. Thisroute was essential, the sea was crawling with monsters in thosedays. Since this most fortunate day, almost four hundred years ago,the European tectonic plate has shifted significantly. As a resultall coordinates have to be shifted by (1, 0).
Write a program that solves this puzzle. This has to be done inthe following way: Start with the coordinates on the first row,weave the coordinates of the second row through the first row, thenweave the coordinates of the third row through the resulting rowetc. Note, if two rows of unequal length have to be woven, the tworows are woven as far as possible. After the elements of theshortest row have been exhausted, the row is completed by addingthe remaining elements of the longest row.
Make a new Coordinate and CoordinateRow class for thisassignment. The latter class has a method to weave a CoordinateRowinto itself. The coordinates of the puzzle are below:
The coordiantes are in a text file. Theinput:
5,4 4,5 8,7=6,3 3,2 9,6 4,3=7,6=9,8=5,5 7,8 6,5 6,4
Every CoordinateRow is seperated from another by an ’=’. Everycoordinate in a row is seperated by a space. The x and y values ofa coordinate are seperated by a comma. After all data has beenread, the program will print the treasure route on the standardoutput.
The correct route:
Traveler, if riches are to be achieved, the solution only has to be weaved. 5,44,5 8,7 Weave 6,3 3,2 9,6 4,3 Weave 7,6 Weave 9,8 Weave 5,5 7,8 6,5 6,4 Show transcribed image text Traveler, if riches are to be achieved, the solution only has to be weaved. 5,44,5 8,7 Weave 6,3 3,2 9,6 4,3 Weave 7,6 Weave 9,8 Weave 5,5 7,8 6,5 6,4
Answer to Use Python 2.7 During his completely miserable life, pirate Abraham Blaufelt has been in search of the lost treasure of …