Compare Two Numbers
EasyP3Coding
Return [greater, less, equal] where greater is whether num1 > num2, less whether num1 < num2, and equal whether num1 == num2.
Example 1
- Input
- num1 = 5, num2 = 3
- Output
- [true,false,false]
Example 2
- Input
- num1 = 3, num2 = 5
- Output
- [false,true,false]
Example 3
- Input
- num1 = 4, num2 = 4
- Output
- [false,false,true]
Constraints
- -10^9 <= num1, num2 <= 10^9
Hints
Give it a real attempt first. Run shows which examples fail.
Saved automatically
Run checks the 3 visible tests, Submit all 8. ⌘Enter runs, ⌘⇧Enter submits.