Write a Python program to find maximum between two numbers.

PROGRAM

# Program to find the maximum between two numbers

# Take input from the user
num1 = float(input(“Enter the first number: “))
num2 = float(input(“Enter the second number: “))

# Compare the numbers
if num1 > num2:
print(f”The maximum number is: {num1}”)
elif num2 > num1:
print(f”The maximum number is: {num2}”)
else:
print(“Both numbers are equal.”)

OUTPUT

TRY THE ABOVE CODE

Leave a Reply

Your email address will not be published. Required fields are marked *

sign up!

We’ll send you the hottest deals straight to your inbox so you’re always in on the best-kept software secrets.