1) maximum in two nums
num1=int(input("Enter the number: "))
num2=int(input("Enter the number: "))
if(num1>num2):
print(f"{num1} is greater than {num2}")
else:
print(f"{num2} is greater than {num2}")
2) maximum in three numbers
x=int(input("enter the number: "))
y=int(input("enter the number: "))
z=int(input("enter the number: "))
if(x>y)and(x>z):
print(f"{x} is greater than {y} and {z}")
elif(y>x)and(y>z):
print(f"{y} is greater than {x} and {z}")
else:
print(f"{z} is greater than {x} and {y}")
3) divisible by 3 or not
n=int(input("Enter the number: "))
if(n%3==0):
print(f"{n} is divisible by 3")
else:
print(f"{n} is not divisible by 3")
4) divisible by 5 or not
n=int(input("enter the number: "))
if(n%5==0):
print(f"{n} is divisible by 5")
else:
print(f"{n} is not divisible by 5")
5) divisible by 11 or not
n=int(input("enter the number: "))
if(n%11==0):
print(f"{n} is divisible by 11")
else:
print(f"{n} is not divisible by 11")
6) even or odd
n=int(input("Enter the number: "))
if(n%2==0):
print(f"{n} is even")
else:
print(f"{n} is odd")
7) leap year or not
n=int(input("enter the year: "))
if(n%400==0):
print(f"{n} is leap year")
elif(n%4==0)and(n%100!=0):
print(f"{n} is leap year")
else:
print(f"{n} is not a leap year")
8) positive or negative number
n=int(input("Enter the number: "))
if(n>0):
print(f"{n} is positive number")
else:
print(f"{n} is negative number")
9) vowel or consonant
x=input("enter the input: ").lower()
if(x == 'a')or(x == 'e')or(x == 'i')or(x == 'o')or(x == 'u'):
print(" is vowel")
else:
print(" is consonant")
10) uppercase or lowercase
x=input("enter the input: ")
if(x == x.lower()):
print("input is in lowercase")
elif(x == x.upper()):
print("input is in uppercase")
else:
print("input is not in uppercase nor in lowercase")
11) valid to vote or not
age=int(input("Enter your age: "))
if(age>18):
print("This Person is valid to vote")
else:
print("This person is not valid to vote")
12) if multiple of 5 print hello or Bye
n=int(input("enter the number: "))
if(n%5==0):
print("Hello")
else:
print("Bye")
13) last digit of number
n=int(input("Enter the number: "))
print(n%10)
14) last digit is divisible by 3 or not
n=int(input("Enter the number: "))
x=(n%10)
if(x%3==0):
print("last digit of this number is divisible by 3")
else:
print("last digit of this number is not divisible by 3")
15) enter number between 1 to 7 display name
n=int(input("Enter the number: "))
if(n==1)or(n==2)or(n==3)or(n==4)or(n==5)or(n==6)or(n==7):
Print("the name")
else:
print("only eccepts number between 1 to 7")
OR
n=int(input("Enter the number: "))
if(n==1):
print("one")
elif(n==2):
print("two")
elif(n==3):
print("three")
elif(n==4):
print("four")
elif(n==5):
print("five")
elif(n==6):
print("six")
elif(n==7):
print("seven")
else:
print("only eccepts number between 1 to 7")
16) senior citizen or not
age=int(input("Enter your Age: "))
if(60<=age<=80):
print("This person is senior citizen")
else:
print("This person is not a senior citizen")