108k views
7 votes
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!

User Hcarrasko
by
4.6k points

1 Answer

2 votes

Answer:

Step-by-step explanation:

あなたはとても単純な愚か者ですあなたのお母さんの愚か者はあなたを愚か者にします人生の失敗あなたは悲しい処女ですそれでなぜあなたはハブを見ているのですか?s00pid bumbumでアメリカの場所でh0です。レッスンを聞いて自分をなめるか、年上のダミーのときに愚かな猫の砂糖のガールフレンドになるあなたは猫とのぞき見馬鹿を吸う

User Byroncorrales
by
4.2k points