If - elif - else condition


ph = int(input("Enter ph of a liquid : "))

if ( ph <= 3 and ph >= 0 ) : 
    print("strong acid")

elif ( ph >= 4 and ph <=6 ):
    print("weak acide")

# complete the remaning condition

else : 
    print("invalid input")

Combining multiple conditions together using logical operator ( and or )


month = int(input("Enter month : "))

if ( month == 1 or month == 3 or month == 5 or month == 7 or month == 8 or month == 10 or month == 12) : 
    print("31 daysssss")

elif ( month == 2 ) : 
    print("28/29 days ")

elif ( month <=2 and month <= 11) :
    print("30 days ")

else : 
    print("Invalid month number ")