Find the lowest number between three numbers.

In this python if else program, we will find the lowest number between three numbers.

Steps to solve the program
  1. Take three numbers as input.
  2. Using nested if-else statements find the lowest number among them.
  3. If num1 is less than num2 create a nested if-else statement to check whether the num1 is less than num2 if yes then num1 is the lowest number.
  4. If num2 is less than num1 create a nested if-else statement to check whether the num2 is less than num3 if yes then num2 is the lowest number.
  5. Else num3 is the lowest number.
  6. Print the respective output.
				
					num1 = 45
num2 = 23
num3 = 68

if num1<num2:
    if num1<num3:
        print("Lowest numbner: ",num1)
elif num2<num1:
    if num2<num3:
        print("Lowest numbner: ",num2)
else:
    print("Lowest number: ",num3)
				
			

Output :

				
					Lowest numbner:  23
				
			

Related Articles

check whether the citizen is a senior citizen or not.

accept the temperature in Fahrenheit and check whether the water is boiling or not.

Leave a Comment