Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

OLA Reeborg The Steeplechase Race Task please read thoroughly. Provide a python program/code for this TASK: Program Reeborg to run a steeplechase. In this race

OLA Reeborg The Steeplechase Race Task please read thoroughly. Provide a python program/code for this

image text in transcribed

image text in transcribed

TASK: Program Reeborg to run a steeplechase. In this race the hurdles are arbitrarily high and arbitrarily wide, and the course has no fixed finish corner. In each race course the finish is marked by a beeper that Reeborg must pick up before turning himself off. Reeborg starts at the origin facing East. Only the leftmost beeper along Street 1 is considered the finish mark; ignore any other beepers that may be present. The figure below illustrates one possible course; Reeborg completes this race once he reaches Avenue 16, which is where the leftmost beeper along Street 1 is located. 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Avenue IMPLEMENTATION NOTES: Model your program after the hurdles race example from lecture; this is an exercise in adaptive maintenance. Use as your "starter file $PUB/hurdles For.py Use as your source file name "chase.py". Store your files 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. Do NOT use any vari- ables. Also, do NOT use any recursive procedure calls, that is, no functions call themselves.) TEST SITUATIONS: Your program must complete the task under ALL legal initial situations to be considered correct. The specific situation (world) provided for you to test your program is chase A.wld that can be copied from $PUB. (Note: the chase A.wld is NOT the same as the sample world depicted above.) REQUIRED: You are to electronically submit the source program and a screenshot of the outcome obtained from running your program against the pro- vided test world. Once you are sure your program is working and don't forget to check you've updated the comments!), run your program against chase A.wld. When the program has successfully completed, click the screenshot button (looks like a camera ) located on the right side of the toolbar. This will save a screenshot of the rur window in the file chase A.pdf. If you wish to check that your screenshot came out okay, you may view your screenshot with the command $ acroread chaseA.pdf Once you have the screenshot chaseA.pdf, enter the command $ handin ola3 chase.py chaseA.pdf (Note: You will NOT need to hand in any hardcopy for this assignment.) TASK: Program Reeborg to run a steeplechase. In this race the hurdles are arbitrarily high and arbitrarily wide, and the course has no fixed finish corner. In each race course the finish is marked by a beeper that Reeborg must pick up before turning himself off. Reeborg starts at the origin facing East. Only the leftmost beeper along Street 1 is considered the finish mark; ignore any other beepers that may be present. The figure below illustrates one possible course; Reeborg completes this race once he reaches Avenue 16, which is where the leftmost beeper along Street 1 is located. 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Avenue IMPLEMENTATION NOTES: Model your program after the hurdles race example from lecture; this is an exercise in adaptive maintenance. Use as your "starter file $PUB/hurdles For.py Use as your source file name "chase.py". Store your files 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. Do NOT use any vari- ables. Also, do NOT use any recursive procedure calls, that is, no functions call themselves.) TEST SITUATIONS: Your program must complete the task under ALL legal initial situations to be considered correct. The specific situation (world) provided for you to test your program is chase A.wld that can be copied from $PUB. (Note: the chase A.wld is NOT the same as the sample world depicted above.) REQUIRED: You are to electronically submit the source program and a screenshot of the outcome obtained from running your program against the pro- vided test world. Once you are sure your program is working and don't forget to check you've updated the comments!), run your program against chase A.wld. When the program has successfully completed, click the screenshot button (looks like a camera ) located on the right side of the toolbar. This will save a screenshot of the rur window in the file chase A.pdf. If you wish to check that your screenshot came out okay, you may view your screenshot with the command $ acroread chaseA.pdf Once you have the screenshot chaseA.pdf, enter the command $ handin ola3 chase.py chaseA.pdf (Note: You will NOT need to hand in any hardcopy for this assignment.)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions