Purpose:

• Write AND OR & NOT logic in pseudo-code and Raptor.
Requirements:
In Notepad, write pseudo-code for the following. The object of the game is to determine who the player is, based on a series of questions. Inputs Ask the player the following five Boolean questions and save the user's answers in variables.
• Are you the son of ZEUS? y/n
• Are you the son of HERA? y/n
• Can you be burned by fire? y/n
• Did you kill a monster? y/n
• Did you win a battle? y/n
When you ask the questions, use "y" for yes and "n" for no. Processing You MUST use AND OR and NOT to complete this exercise.You MUST use the following information to determine the answer
• Zeus and Hera have a son named Ares
• Hercules, the son of Zeus and Leto, killed the monster, Hydra
• Slaying a monster or winning a battle makes you Master Warrior
• Children of Poseidon cannot be burned by fire
Remember :- you will ask only those questions I gave you
- the answers will be yes/no
- the only possible "gods" could be the four I have listed. Otherwise the logic will not work. In other words, if Apollo was answering the questions (he is not one of the 4 gods on my list) you would get a weird answer. So stick to those 4 answering the questions.
OutputsWhen you figure out the answer, output the answerThese are the answers you will use:
• “You are Ares, the god of war”
• “You are Hercules, the immortal hero”
• “You are a Master Warrior of the Greek Gods”
• “You are Otos the giant - the child of Poseidon”
• "I don't know who you are"
At the end, output “Programmed by: your name” PART 2 - Use RAPTOR to program the Greek Gods Game.Submit both the Pseudo code and the Raptor files.NOTE: Here are two ways to code NOT in Raptor.not(age >21)

(age != 21) Extra Credit
• Figure out how to use the play_sound() function in Raptor. Add an appropriate sound effect for God, which plays when you figure out which God it is.
• You cannot use my files Blackboard, you must find your own.
• Hint: You can only use .wav files.
• Be sure to put all the .rap and the .wav files in a folder, zip it and submit it.

Seems pretty straightforward to me. Where are you getting stuck?

i am not able to start constructing it. can you please help me

What does the user have to input, and as a result of these inputs, what do you need to output back to the user?

Inputs:

Ask the player the following five Boolean questions and save the user's answers in variables.
• Are you the son of ZEUS? y/n
• Are you the son of HERA? y/n
• Can you be burned by fire? y/n
• Did you kill a monster? y/n
• Did you win a battle? y/n

Outputs:
When you figure out the answer, output the answer. These are the answers you will use:
• “You are Ares, the god of war”
• “You are Hercules, the immortal hero”
• “You are a Master Warrior of the Greek Gods”
• “You are Otos the giant - the child of Poseidon”
• "I don't know who you are"

Exactly! Good job :)

So first, in your pseudo code, you have to ask for and store the five inputs.

Then, based on the five inputs, you have to print out one (and only one) output to the user.

it's just I am kind of fresh for it, so do I start by writing the variables? if yes how? I just need some hint (on the beginning) to proceed. by the way, thank you for helping me

hint, please?

Did you get the assignment done?

I am doing the same assignment and it is very confusing to me.

Sure! I can help you with that. Here's how you can write the pseudo-code for the Greek Gods Game:

```
Ask the user the following five Boolean questions and save the answers in variables:

Write AND, OR & NOT logic using the following information to determine the answer:
- Zeus and Hera have a son named Ares.
- Hercules, the son of Zeus and Leto, killed the monster Hydra.
- Slaying a monster or winning a battle makes you a Master Warrior.
- Children of Poseidon cannot be burned by fire.

IF sonOfZeus == yes AND sonOfHera == no AND burnedByFire == no AND killedMonster == no AND wonBattle == no THEN
Output "You are Ares, the god of war"
ELSE IF sonOfZeus == yes AND sonOfHera == no AND burnedByFire == no AND (killedMonster == yes OR wonBattle == yes) THEN
Output "You are Hercules, the immortal hero"
ELSE IF sonOfZeus == no AND sonOfHera == no AND burnedByFire == no AND (killedMonster == yes OR wonBattle == yes) THEN
Output "You are a Master Warrior of the Greek Gods"
ELSE IF sonOfZeus == no AND sonOfHera == no AND burnedByFire == yes AND (killedMonster == no OR wonBattle == no) THEN
Output "You are Otos the giant - the child of Poseidon"
ELSE
Output "I don't know who you are"
ENDIF

Output "Programmed by: <your name>"
```

Now, let's move on to implementing this logic in Raptor.

In Raptor, you can use a flowchart to represent the logic. Here's how you can do it:

1. Create a Start symbol.
2. Add an Input symbol labeled "Are you the son of Zeus? (y/n)" and assign the input to a variable called "sonOfZeus".
3. Add an Input symbol labeled "Are you the son of Hera? (y/n)" and assign the input to a variable called "sonOfHera".
4. Add an Input symbol labeled "Can you be burned by fire? (y/n)" and assign the input to a variable called "burnedByFire".
5. Add an Input symbol labeled "Did you kill a monster? (y/n)" and assign the input to a variable called "killedMonster".
6. Add an Input symbol labeled "Did you win a battle? (y/n)" and assign the input to a variable called "wonBattle".
7. Add a Decision symbol labeled "Is the answer 'sonOfZeus' yes AND 'sonOfHera' no AND 'burnedByFire' no AND 'killedMonster' no AND 'wonBattle' no?"
- If the condition is true, add an Output symbol with the message "You are Ares, the god of war".
- If the condition is false, move to the next Decision symbol.
8. Add a Decision symbol labeled "Is the answer 'sonOfZeus' yes AND 'sonOfHera' no AND 'burnedByFire' no AND ('killedMonster' yes OR 'wonBattle' yes)?"
- If the condition is true, add an Output symbol with the message "You are Hercules, the immortal hero".
- If the condition is false, move to the next Decision symbol.
9. Add a Decision symbol labeled "Is the answer 'sonOfZeus' no AND 'sonOfHera' no AND 'burnedByFire' no AND ('killedMonster' yes OR 'wonBattle' yes)?"
- If the condition is true, add an Output symbol with the message "You are a Master Warrior of the Greek Gods".
- If the condition is false, move to the next Decision symbol.
10. Add a Decision symbol labeled "Is the answer 'sonOfZeus' no AND 'sonOfHera' no AND 'burnedByFire' yes AND ('killedMonster' no OR 'wonBattle' no)?"
- If the condition is true, add an Output symbol with the message "You are Otos the giant - the child of Poseidon".
- If the condition is false, move to the next Decision symbol.
11. Add an Output symbol with the message "I don't know who you are".
12. Add an Output symbol with the message "Programmed by: <your name>".
13. Connect the symbols according to the flow of the logic.

Once you've created the flowchart in Raptor, you can run it and test it with different inputs to see if it produces the correct output.

That's it! You have now written the pseudo-code and implemented the logic in Raptor for the Greek Gods Game.