41. Python Program to find the Biggest of two numbers using Switch Case.
How does this program work?
- In this program you are going to learn about how to find the biggest number among two numbers by using Switch Case in Python.
- The integer entered by the user is stored in two variables a and b.
- After that compare two numbers, If a is greater than b then print a is biggest else print b is biggest using switch.
Here is the code
def switch(a,b):
if a > b:
print("Biggest one is: ",a)
elif a < b:
print("Biggest one is: ",b)
else:
print("Both are equal")
a = int(input("Enter first number: "))
b = int(input("Enter second number: "))
switch( a,b)