Answered You can hire a professional tutor to get the answer.
Your story needs to have at least three (3) turning points. It can have more but no fewer. If the user answers three questions, this will result in...
Your story needs to have at least three (3) turning points. It can have more but no fewer. If the user answers three questions, this will result in eight (8) possible outcomes for your story. To keep from becoming confused you will have to keep your code well formatted and organized.
You don't need to write novel. A sentence or two between each question is totally fine.
- Three (3) questions must be asked no matter how the user answers the previous question.
- The story must have eight (8) possible different outcomes.
- The story must be printed out to the console.
- As usual, keep it safe for work.
- You must personalize the story using data asked from the user.
Hint
This program will require you to format your code carefully. Use indentation rules the way I have demonstrated in class and lecture notes. You will need to place if/else blocks within other if/else blocks for this program to work. For example:
(firstAnswer === ) { (secondAnswer === ) {} {}} {}This example shows a single level of nesting. Your program must have two levels of nesting. In the simplest case, there should be a total of 7 if keywords and 7 else keywords.
Some general coding guidelines
- When creating loops and if/else blocks put the opening curly brace on the line that contains the beginning statement.
- Put all code in if/else blocks or loops on another line (not on the line stating the block).
- The closing curly brace should be on a new line after any other code in the block.
- Prefer === to == when checking for equality.
- Indent code within if statements and loops.
Good example:
(name === ) {.log();} {.log();} (bobAge < ) {.log();}Bad example:
(name == ){.log();}{.log();} (bobAge < ) {.log();}Example Program Output
Here is an example of a how the program might work...
Enter your favorite color: redEnter your favorite food: applesEnter your favorite animal: tigerYou are walking down the street eating some apples when a red tiger runs up and takes your lunch and then runs away... you want the tiger ?> run awayYou run away the tiger but it a bad idea run an animal. It turns decides try eat you. You see a bus blocking your up ahead. you the bus ?> aroundYou around the bus see a subway entrance. you ?> There a zoo keeper the subway. He captures the tiger you saved.The End.