subject
Advanced Placement (AP), 27.01.2021 21:40 Gtx014

Now that we know the results, it’s time to determine the winner! Inside your if/else statement that prints out odd or even, add another set of if/else statements to tell who the winner is, based on what the player chose back in stage 1.

Here is some "pseudo code" (notation resembling simplified code, not real code) that you can use to write the real code.

if (the sum was even) {

print out even

if (the user chose evens) {

the user wins

}

else {

the computer wins

}

else {

// inverse of above if statement

}

}

Here is an example of what the output of your stage three should produce:

>Let’s play a game called "Odds or Evens"

>What is your name?

Douglas

>Hi Douglas, which do you choose? (O)dds or (E)vens?

O

>Douglas has picked odds! The computer will be evens.



>How many fingers do you throw?

4

>The computer plays 4 "fingers".



4 + 4 = 8

8 is... even!

That means the computer wins!

ansver
Answers: 1

Another question on Advanced Placement (AP)

question
Advanced Placement (AP), 22.06.2019 12:30
In the northern hemisphere what is the direction of the surface wind circulation in a high pressure system
Answers: 3
question
Advanced Placement (AP), 23.06.2019 11:20
Want free points and brainliest? answer this correctly and i got you a preventative measure against encountering vehicle malfunctions in the middle of a drive is to a. assess your fitness to drive b. do a quick vehicle pre-check c. clean and wash the vehicle d. deflate and inflate your tires
Answers: 1
question
Advanced Placement (AP), 23.06.2019 17:00
What are the main functions of the human skeleton? a exchange of gases b support and movement c sensing the environment d digestion and excretion
Answers: 1
question
Advanced Placement (AP), 23.06.2019 20:20
What is the top speed in a parking lot? a. 10 mph b. 20 mph c. 25 mph d. 30 mph
Answers: 2
You know the right answer?
Now that we know the results, it’s time to determine the winner! Inside your if/else statement that...
Questions
question
Mathematics, 01.12.2019 13:31
Questions on the website: 13722361