Loading Skulpt Python Interpreter...

Loading from jsDelivr CDN. This should be fast and reliable.

Check Nums

Easy
Logic
Acceptance: 92.1%

Have the function CheckNums(num1, num2) take both parameters being passed and return the string true if num2 is greater than num1, otherwise return the string false. If the parameter values are equal to each other then return the string -1.

Examples

Example 1:

Input:num1 = 3, num2 = 122
Output:"true"
Explanation:Since 122 > 3, return 'true'

Example 2:

Input:num1 = 67, num2 = 67
Output:"-1"
Explanation:Since 67 == 67, return '-1'

Example 3:

Input:num1 = 54, num2 = 10
Output:"false"
Explanation:Since 10 < 54, return 'false'

Constraints

  • Both parameters will be integers
  • Return values must be strings: 'true', 'false', or '-1'
  • Parameters can be positive, negative, or zero

Code Editor

python