Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please do the following assignment in Python. OLA0S Preject D March 12, 201 BACKGROUND: Reeborg likes to take long meandering walks in his world. On

Please do the following assignment in Python. image text in transcribed
OLA0S Preject D March 12, 201 BACKGROUND: Reeborg likes to take long meandering walks in his world. On one such walk he discovered a map showing the way to some treasure. Reeborg is puzzled as to how to follow the clues and needs help from a programmer TASK: Program Reeborg to follow the clues on the treasure map. When Reeborg reaches his destination (you know, "X marks the spot") he should pick up the beepers there, then turn to the north and turn himself off (Obviously to wait for the truck carrying his team of excavators to arrive SITUATION DETAILS: The clues on Reeborg's map consist of pairs of clue corners. With one exception, the direction clue corner has from 1 to 4 beepers on it and indicates which direction Reeborg should go to find the next clue. The directions are encoded as: East-l, North 2. West-3, South 4 beepers. The distance clue corner is somewhere adjacent to the direction clue corner. By adjacent we will mean either immediately above or below or to either side of the direction clue corner, diagonal coners can be disregarded. The number of beepers on this distance corner indicate how far Reeborg must pace to the next clue from the position of the direction clue corner. While following the directions, Recborg will not be presented with any obstacles directly on his path. However, there may well be wall sections cluttered around the direction clue corner that might make finding the distance clue corner interesting". Reeborg will start each task sitting on a direction clue comer. The destination X) is a direction clue corner that has five beepers on it. (Five beepers is obviously a sentinel value.) With the exception of the final five beepers, that Reeborg should take as a momento of his journey, Reeborg MUST leave each corner with the SAME number of beepers as were there originally IMPLEMENTATION NOTES: As usual, only one turn ott) may be used and that one must be located in the main routine. Do NOT use any recursive procedure calls, that is, no functions call themselves. If you wish, you may use compound predicates in this program You WILL need to use variables in this program. This assignment is meant to exercise YOUR skills in using value-returning functions and your understanding of passing data to functions using arguments and parameters; do nor use any global variables. When your program is completed, draw a hierarchy chart and using that as a guide hierarchically arrange the order of functions within your source file (with your maint) function first); you will not be asked to turn in your hierarchy chart for this assignment hes do not use any global Use as your source file name "treasure.py". There is no starter file for this assignment. However to save time, feel free to copy and make use of the beepers on cornerO and move forward0 functions developed in lecture; either type them in from your lecture notes or they can be lifted from the file SPUBluckywalk py. TEST SITUATIONS: There are two situations (worlds) being provided to you to test your program: treasureA.wld and treasureB.wld. These can be copied from SPUB GRADING: In addition to examining your source code and the execution results obtained by running your program against the two situations above, the grader may run your program against some additional (and unknown to you) situations. Your program must complete the task under ALL legal initial situations to be considered correct. REQUIRED: You are to electronically submit the source program and a screenshot of the outcome obtained from you are sure your program is working, run your program against treasureBwld. When the program has successfully completed, take a screenshot using the screenshot button located on the right side of the toolbar. This will save a screenshot of that window in the file treasureB.pdf. (If you wish to check that your screenshot came out okay, you may viesw your screenshot with the command s acroread treasure.pdf) Enter the command running your program against the treasureB.wld test world. Once s handin ola108 treasure-py treasureB.pdf to submit your assignment. htp:hwww.cs.mts.edauwatch/1170/private/treasure himl (maintained by Roland H Untch

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Objects And Databases International Symposium Sophia Antipolis France June 13 2000 Revised Papers Lncs 1944

Authors: Klaus R. Dittrich ,Giovanna Guerrini ,Isabella Merlo ,Marta Oliva ,M. Elena Rodriguez

2001st Edition

3540416641, 978-3540416647

More Books

Students also viewed these Databases questions

Question

What lessons in OD contracting does this case represent?

Answered: 1 week ago

Question

Does the code suggest how long data is kept and who has access?

Answered: 1 week ago