Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create an application that allows the user to explore a haunted house. Specifically, the user should be presented options of what room they'd like to
Create an application that allows the user to explore a haunted house. Specifically, the user should be presented options of what room they'd like to explore, and on selecting that room, the program should provide the user with a spooky description of that room.
Exploring a room should take the user "hour" just a count, not a real world hour Keep a total of how many hours the user has been in the house.
When the user starts the program, they should be given four options: three options should take them to a room, and the fourth option allows them to leave the house and end the application. When the user decides to leave, tell them how many hours they've spent in the house.
Tips:
Use a while loop to keep the user in the house as long as they want to be there
Inside that loop, ask the user what room they'd like to visit.
Use if statements based on user input to describe different rooms to the user
Example:
"Welcome to the house. Enter to go to the kitchen, to go to the bedroom, and to go to the living room. Enter to quit."
Oh it's such a spooky bedroom. Oh man, you would not believe how spooky this is For real, super spooky."
"Enter to go to the kitchen, to go to the bedroom, and to go to the living room. Enter to quit."
"Goodbye! You spent hours in the house
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