Background:
The town recluse has invited you to dinner at his lavish century-old Victorian mansion outside of town; the dress is formal. When you arrive, you greet and are greeted by the other guests and house staff. After socializing, dinner begins in the dining room underneath the sparkling crystal chandelier with dishes that dazzle every sense. Eventually all the guests, including you, retire to the beautifully appointed and elegant drawing room. You lean back in a comfortable chair to enjoy after dinner refreshments and even better conversation and games. Eventually, despite your best efforts, you fall asleep from all the good food and refreshment.
When you wake, you are seated in total darkness and briefly disoriented. Suddenly, a mellifluous voice announces that there is a new game in which you have the chance to win $100,000 simply by finding the bag of cash behind a certain door in the room. Once you have found the money, then you must find the door to the mansion’s corridor.
However, it’s not as easy as it sounds. You are told there are four doors in the round room in each of the cardinal directions (East, West, North, South). Your chair is in the center of the room, but you do not know which direction you are facing. Each door holds one of the following special surprises behind it:
- Door 1 leads to the corridor
- Door 2 leads to a 40 foot drop to a cave floor underneath the mansion and death
- Door 3 leads to the bag of cash
- Door 4 leads to a vicious dog that would love to eat you.
You obviously have only one chance to pick the correct door with the money and then exit the room through the correct door to the corridor.
Additional information:
- Once you stand, your chair will sink into the floor so you must remember how many steps you took from it to the wall and/or door because you must remember this to get back to your starting point.
- You have no form of communication with the outside world (i.e. no cell phone, etc.).
- The room is totally silent (i.e. no outside noises or noises from within the room).
- When you pick a door, you must step through into a small vestibule and shut the door to see if you have chosen well. One of the following will happen:
- The floor will open, and you will drop 40 feet to the cave floor
- A viscous dog will be released through a hidden panel
- A panel directly in front of you will open with a bag of cash for you to grab
- A door will open to the corridor and your escape
- If you find door to the cash,
- when you lift the bag, hundreds of razor sharp spikes will protrude from the walls of the main room so you can’t feel your way to follow the wall to any other door.
- exit the vestibule and, remembering your steps, turn around and proceed back to the center of the room.
- From this starting point, you will have to turn 90 degrees in either of two directions to exit the room through either the door to the corridor and success or the door to the 40 foot drop to the cave floor and death. Notice that you no longer will have the dog to worry about!
- There is no light whatsoever in the room – total darkness.
Questions to Analyze:
- What
algorithm would you create to find a door and what may be behind it? - If you find the cash, what steps will you take to find the correct door out of the room and avoid the deadly spikes?
- Of all the information given to you, what is most important to take into consideration?
- How will you sense your surroundings?
Writing the Algorithm:
Use natural language to write your algorithm. Applying deductive reasoning, write the algorithm using logic based upon your assumptions and the defined alternatives and outcomes provided in the exercise.
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps
- Chapter 10: Improve number and string formatting Update the program to improve the formatting of the numbers and the strings. Console MENU OPTIONS 1 2 3 4 5 6 7 Display lineup Add player Remove player Move player Edit player position Edit player stats Exit program POSITIONS C, 1B, 2B, 3B, SS, LF, CF, RF, P Menu option: 1 Player 1 Tommy La Stella 2 Mike Yastrzemski 3 Donovan Solano Baseball Team Manager 4 Buster Posey 5 Brandon Belt 6 Brandon Crawford 7 Alex Dickerson 8 Austin Slater 9 Kevin Gausman Menu option: 7 Bye! ============================== POS 3B RF 2B с 1B SS LF CF P AB H 1316 360 0.274 563 168 0.281 1473 407 0.276 0.302 4575 1380 3811 1003 4402 1099 160 147 2 586 569 56 AVG 0.263 0.250 0.273 0.274 0.036 Specifications Use the repetition operator to make sure that horizontal separator lines use 64 characters. • Use spaces, not tabs, to align columns. This should give the program more control over how the columns are aligned. • Make sure the program always displays the batting…arrow_forwardwitch step or steps is the incorrect answer form the image below and say what is the correct answerarrow_forwardTranscribed Image Text A student took four quizzes in a term and would like to compute their average. He also would like to know what will be the remarks. Follow the range of grades and its equivalent remarks, and then fill-up the table below: 100-95 - Excellent 94-90 – Very Satisfactory 89-85 - Satisfactory 84-80 - Fine 79-75 - Fair 74 and below - Poorarrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education