Menu

Sign in to track your progress and unlock all features.

Theme style

Log in

Full lesson preview

Find Maximum of Three Numbers

Learn how to find the maximum of three numbers.

Python practice10 minBeginnerLast updated December 26, 2025

Problem statement

Write a function that takes three numbers as input and returns the maximum of the three. Use simple comparison operators to determine the largest number.

Task

To understand how to compare numbers and return the largest one.

Examples

Example 1

Input

maximum(3, 5, 2)

Output

5

Among 3, 5, and 2, the maximum number is 5.

Input format

Three integers, a, b, and c.

Output format

An integer representing the maximum value among a, b, and c.

Constraints

Each of a, b, and c are integers within the range of -100 to 100.

Samples

Sample 1

Input

maximum(-10, 0, 10)

Output

10

Among -10, 0, and 10, the maximum number is 10.