Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

TASK: Assume that Reeborg is somewhere in a completely enclosed rectangular room that contains one becper. There are no obstacles within the room. Program Reeborg

image text in transcribed
TASK: Assume that Reeborg is somewhere in a completely enclosed rectangular room that contains one becper. There are no obstacles within the room. Program Reeborg to find the beeper, pick it up, face south, and turn himself off. BACK STORY: A programmer named Andr was originally hired to write this program. Andr had made an outline of a solution and begun coding when he won a six month all- expense-paid trip to France and left his job---leaving completion of the program to someone else. You are the someone else. Your job is to finish the program. The still-to-be-completed program is found in SPUB under the name findbeeper Start.py. IMPLEMENTATION NOTES: Use as your source file name "findbeeper.py". Do your work in your rola directory. Only one turn_off() may be used in this program and that one must be located in the main routine. Don't forget to include the title line and global comments at the top of your program; be sure the details reflect this assignment. Use comments in front of your functions to clarify the purpose of the function. This is a "Classic Reeborg" assignment; use only the Python technology you learned in items #1 through #17 of the "Reeborg the Robot Programming Summary" handout. Do NOT use any variables. De NOT use any compound predicates, that is no ANDs or ORS, because you really don't need them in this assignment. (Also, do NOT use any recursive procedure calls, that is, no functions call themselves.) For your program, you must use Andr's code as your starting point: def main(): move_to_the_beeper() pick beeper) face_south) turn_off() # Traverse systematically until stopping on beeper corner def move_to_the_beeper(): go_to_northwest_corner() face_south() while not on_beeper(): move_to_next_adjacent_street_corner() NOTE: Remember, this assignment is meant to exercise YOUR ability to think; neither offer nor accept any additional help, except on a one-to-one basis with the instructor or the lab assistant. TEST SITUATIONS: There are three situations (worlds) available in SPUB that you should use in testing your program: findA.wld, findB.wid, and find.wld. In addition, you should try your program against any relevant test worlds you may wish to create. GRADING: In addition to examining your source code and the execution results obtained by running your program against the three 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

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

Harness The Power Of Big Data The IBM Big Data Platform

Authors: Paul Zikopoulos, David Corrigan James Giles Thomas Deutsch Krishnan Parasuraman Dirk DeRoos Paul Zikopoulos

1st Edition

0071808183, 9780071808187

More Books

Students also viewed these Databases questions

Question

How effective was the school improvement plan?

Answered: 1 week ago