Python Program to Find number is Greater or Smaller

Python Program to Find number is smaller or bigger 


a=10

b=20

if a>b:

    print("a is bigger")

else:

    print("a is smaller")

print("End of program")


Output:

a is smaller

End of program


Python program to find number is greater or smaller. Take user input

a=int(input("Enter first number:"))
b=int(input("Enter second number:"))
if a>b:
    print(f"First number {a} is greater than second number {b}")
else:
    print(f"First number {a} is smaller than second number {b}")
print("End of Program")

Output:
Enter first number:200
Enter second number:100
First number 200 is greater than second number 100
End of Program

टिप्पणी पोस्ट करा

0 टिप्पण्या