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!
Answers: 1
Advanced Placement (AP), 25.06.2019 20:00
Motorcyclists may have to suddenly change direction when encountering a. potholes and reflective markers b. yellow lights c. pavement seams and railroad crossings d. strong winds
Answers: 1
Advanced Placement (AP), 26.06.2019 21:40
Given the multitude of treatment options available, how do clients/patients determine which therapeutic style is best for them? which therapeutic style do you feel is most effective, and why?
Answers: 2
Advanced Placement (AP), 27.06.2019 00:30
Submitting the profile which includes sending a report to one college cost
Answers: 1
Advanced Placement (AP), 27.06.2019 07:50
An economy that is not using all of its resources would: be operating on the line closer to the vertical axis. be operating on the line closer to the horizontal axis. be operating inside the production possibilities curve. be operating outside the production possibilities curve. be suffering from high inflation.
Answers: 1
Now that we know the results, it’s time to determine the winner!
Inside your if/else statement that...
Mathematics, 18.02.2020 17:56
English, 18.02.2020 17:56