25. Python Program to find Smallest of given two numbers.
How does this program work?
- In this program you are going to learn about how to find Smallest of given two numbers using Python.
- In this program compare two numbers by using if statement, then we get the Smallest number among two numbers.
Here is the code
a = int(input("Enter first number: "))
b = int(input("Enter second number: "))
if a < b:
print("Smallest one is: ",a)
elif a > b:
print("Smallest one is: ",b)
else:
print("Both are equal")