**Takes three numbers as arguments and returns the largest of them.**

**Use of min() and max() in Python **

User can enter any three numbers from key-board and then we can find that among that three number which is greatest number. If you want find least number then also you can find.

**Aim: **A function max_of_three() that takes three numbers as arguments and returns the largest of them.

**Algorithm:**

**Step1**. start

**Step2**. define max function

**Step3**. In max function read a, b, c

**Step4**. check the condition a>b and a>c **Step5**.

If the condition is true return a

**Step6**. Otherwise check the condition b>c

**Step7**. If the condition is true return b Otherwise return c

**Step8**. declare the variables a,b,c and read them.

**Step9**. Print the largest of three numbers.

**Step10**. End **Program:** def max(a,b,c):

if (a>b and a>c):

return a

elif(b>c):

return b

else:

return c

a=int(input(‘enter a:’))

b=int(input(‘enter b:’))

c=int(input(‘enter c:’))

ans=max(a,b,c)

print(‘largest of three numbers=’, ans) ** **

**Output:**

>>>

enter a:23

enter b:56

enter c:13

largest of three numbers= 56

>>

**Related Link:**

- Python Comment | Creating a Comment | multiline comment | example
- Python Comment | Creating a Comment | multiline comment | example
- Python Dictionary Introduction | Why to use dictionary | with example
- How to do Sum or Addition in python
- Python Reverse number
- find common number in python
- addition of number using for loop and providing user input data in python
- Python Count char in String
- Python Last Character from String
- Python Odd and Even | if condition
- Python Greater or equal number
- Python PALINDROME NUMBER
- Python FIBONACCI SERIES
- Python Dictionary | Items method | Definition and usage
- Python Dictionary | Add data , POP , popitem , update method
- Python Dictionary | update() method
- Delete statement , Looping in list In Python
- Odd and Even using Append in python
- Python | Simple Odd and Even n

Takes three numbers as arguments and returns the largest of them To know more lager number click on wikipedia

Python | Maximum and Minimum in a Set