Answered step by step
Verified Expert Solution
Question
1 Approved Answer
OLA102 Exercise Due: January 30,2019 (Due beginning of lecture.) NOTE: Please remember that cxercises cannot be late. TASK: Program Reeborg to run a mile long
OLA102 Exercise Due: January 30,2019 (Due beginning of lecture.) NOTE: Please remember that cxercises cannot be late. TASK: Program Reeborg to run a mile long super hurdles race. (Recall that eight blocks equal one mile.) The super hurdles course is similar to the hurdle race, but here the barriers can be one, two r three blocks high. The figure below shows one sample initial situation, where Reeborg's final situation and path are indicated on the right Initisl Sitation ST ST L 2 3 4 5 67 8 9 10 AV 1 2 3 4 5 6 7 8 9 10 AV MPLEMENTATION NOTES: Model your program after the hurdles race example from lecture; this is an exercise in adaptive maintenance. (A file containing the hurdles race code from lecture s available as $PUB/ola 102start.py.) Use only the Python statements covered so far: this comesponds to items #1 through #14 of the ee or me o o rogramnung nmn an-handout. (Do NOT use any looping constructs. Also, do NOT use any recursion that is, no functions call themselves.) Do all your work in the OLA directory. Use as your source file name "superhurdles." EST SITUATIONS: The situation world) you will use in testing your program s superhurdles wid , which can be copied from $PUB using the command S cp $PUB/superhurdles.wld superhurdles.wld Although you will be testing your program only against this one situation, your program logic must be able to complete the task under ALL legal initial situations to be considered correct. In other words, your program should correctly run any mile long super hurdles race, regardless of barrier placement.) TIP: Click the reset world reset icon before rerunning a program to be sure Reeborg starts in the same initial situation. REQUIRED: You are to electronically submit the source program and a screenshot of the outcome obtained from running your program against the provided test world. Once you are sure your rogram is working (and don't forget to check you've updated the comments!), run your program against superhurdles.wld When the program has successfully completed. click the screenshot button (looklike a camera located on the right side of the toolbar. Thisll savea screenshot of the rur window in the
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