Computer Science, asked by diljotsinghdhillon, 1 year ago

write a python program to find which no. is smaller no in two numbers​

Answers

Answered by charlie1505
1

Answer:

num1=int(input("Enter your first number:"))

num2=int(input("Enter your second number: "))

if(num1<num2):

print("{} is smallest".format(num1))

elif(num2<num1):

print("{} is smallest".format(num2))

else:

print("{} and {} are equal".format(num1,num2))

Answered by AskewTronics
0

Below are the python program for the above question :

Output :

If the user will enter as 3 and 4, then the output will be 3.

If the user will enter as 4 and 5, then the output will be 4.

Explanation:

Number1=int(input("Enter the first number: "))#Take the first number.

Number2=int(input("Enter the Second number: "))#take the second number.

if(Number1<Number2):#Compare the number.

   print("The lowest number is:",Number1)#print the lowest number.

else:

   print("The lowest number is",Number2)#it also prints the lowest number.

Code Explanation :

  • The above code is in python which takes the two number from the user after instructing the user for the input and store it into two variable.
  • Then the two number is compared in the if-else statement and print the lowest number.

Learn More :

  • Python : https://brainly.in/question/14689905
Similar questions