Challenge 3: Compute & Return Maximum

In this lesson, you are required to compute the maximum of two numbers and return the maximum value.

Problem Statement

Implement the findMaximum function that receives two numbers as arguments x and y and returns the maximum of the numbers.

Input

Two numbers x and y

Output

The maximum of two numbers x and y

Sample Input

x = 2, y = 3

Sample Output

3

Coding Exercise

Write your code below. It is recommended​ that you try solving the exercise yourself before viewing the solution.

Use the “if” statement to compare both numbers using Python Documentation on condition statements.

Make sure you cater to negative inputs as well!

Get hands-on with 1000+ tech skills courses.