0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 4
click for more info
No active XP Potion
Accept a Quest
Login to submit answers
When coding it's necessary to be able to compare two values. Boolean logic
is the name for these kinds of comparison operations that always result in True
or False
.
The operators:
<
"less than">
"greater than"<=
"less than or equal to">=
"greater than or equal to"==
"equal to"!=
"not equal to"For example:
5 < 6 # evaluates to True
5 > 6 # evaluates to False
5 >= 6 # evaluates to False
5 <= 6 # evaluates to True
5 == 6 # evaluates to False
5 != 6 # evaluates to True
Complete the player_1_wins
function. It should return True
if player 1 has a higher score, and False
otherwise.
Focus Editor
Alt+Shift+]
Next Tab
Alt+Shift+[
Become a member to Submit
Become a member to Run
Become a member to view solution