Find Maximum of Two Numbers
Find Maximum of Two Numbers
Tags: Basics
Credit: CodingChallenge
Difficulty: Beginner
Type: Text
Category: Practice
Time Allowed: 5 s
Description:
Write a function that takes two numbers and returns the maximum of the two using built-in functions. This problem is designed to help you practice using built-in functions for finding maximum values
. The function should accept two parameters and return the maximum value.
Constraints:
- The inputs will be
integers
orfloats
. - The function should
return
the maximum of the two numbers.
Example:
- Input:
5, 3
- Output:
5
Test Case | Input | Expected Output |
---|---|---|
1 | [5, 3] | 5 |
2 | [2, 4] | 4 |
3 | [7, 7] | 7 |
4 | [-1, -5] | -1 |
5 | [3.5, 2.5] | 3.5 |
6 | [0, 0] | 0 |
Leave a Comment
Please login to leave a comment.