Answered step by step
Verified Expert Solution
Question
1 Approved Answer
we can change after main def. through go to northwest or face south or while not on beeper and how to complete the function? TASK:
we can change after main def. through go to northwest or face south or while not on beeper and how to complete the function?
TASK: Assume that Reeborg is somewhere in a completely enclosed rectangular room that contains one beeper. 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 $PUB under the name findbeeperStart.py IMPLEMENTATION NOTES: Use as your source file name findbeeper.py". Do your work in your -/OLA 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 Reeb rg the Robot Programm summary handout. Do NOT use any variables. Do 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 beeperT) face_south) turn off) # Traverse systematically until stopping on beeper corner def move_to_the_beeper to northwest corner( ace south while not on beeper move to_next_adjacent street_corner () TASK: Assume that Reeborg is somewhere in a completely enclosed rectangular room that contains one beeper. 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 $PUB under the name findbeeperStart.py IMPLEMENTATION NOTES: Use as your source file name findbeeper.py". Do your work in your -/OLA 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 Reeb rg the Robot Programm summary handout. Do NOT use any variables. Do 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 beeperT) face_south) turn off) # Traverse systematically until stopping on beeper corner def move_to_the_beeper to northwest corner( ace south while not on beeper move to_next_adjacent street_corner ()Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started