FastFoodCoding

Login


Connect with one of the following accounts





Login

Please wait while we redirect...

Views: 18   



Following program shows you how to find largest number from given 2 numbers.
In this program we get inputs from user and shows largest number from given two numbers using if condition

number1 = int(input("Enter first number: "))
number2 = int(input("Enter second number: "))
if (number1 == number2):
    print(number1, " is equal to ", number2)
elif (number1 > number2):
    print(number1, " is larger than ", number2)
else:
    print(number1, " is lesser than ", number2)

Output:

Example1:

Enter first number:  50
Enter second number:  50
50  is equal to  50

Example2:

Enter first number:  180
Enter second number:  65
180  is larger than  65

Example3:

Enter first number:  15
Enter second number:  23
15  is lesser than  23



On By


Top Tutorials

Top Questions

Top Articles

Top Blogs

Top News