Given two numbers, write a Python code to find the Maximum of these two numbers.
Input: a = 2, b = 4 Output: 4 Input: a = -1, b = -4 Output: -1
Method #1: This is the naive approach where we will compare tow numbers using if-else statement and will print the output accordingly.
Method #2: Using max() function
This function is used to find the maximum of the values passed as its arguments.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course