iOS Swift Basics Swift Operators Working With Operators: Part 2

Michael Jenkins
Michael Jenkins
133 Points

Unary Operators Challenge Task 2 of 2

In this game of ours, we have an odd scoring mechanism . At the end of the round, if your score is 10, you lose! If it's anything but 10, you win.

Declare a constant named isWinner and assign the results of a comparison operation to check whether the player has won or not. For example, if the total score is not 10, then the player has won and isWinner should equal true. (Hint: Use the NOT operator)

Justin Horner
Justin Horner
Treehouse Guest Teacher

Hello Michael,

Would you post the code for your attempt for us? By doing so, you'll be helping us to better assist you with the problem you're having on this challenge.

Thanks