Skip to main content
Practice

Coding Quiz

Create a function that takes two numbers, num1 and num2, and returns True if num1 is greater than num2; otherwise, it returns False.

Function Parameters
def solution(num1, num2):
return # Write your code here
  • Returns True if the left number (num1) is greater than the right number (num2).

  • Returns False if the left number (num1) is less than or equal to the right number (num2).


Constraints

  • The numbers provided are integers.

  • The input numbers are non-negative.


Input/Output Example

Input: solution(4, 2)

Output: True

Want to learn more?

Join CodeFriends Plus membership or enroll in a course to start your journey.