top of page

Python | Making months name or months number finder only use if statement


Making months name or months number finder only use if statement

#Program By eboostup.com
#Making months name or months number finder only use if statement
user=str(input('''Enter Months Name or Number'''))
jan="January"
feb="February"
mar="March"
apr="April"
may="May"
jun="June"
jul="July"
aug="August"
sep="September"
oct="October"
nov="November"
dec="December"
if user=="January":
    print("Month Short form = Jan")
    print("Month Name = ",jan)
    print("Month Number = 1")
if user=="February":
    print("Month Short form = Feb")
    print("Month Name = ",feb)
    print("Month Number = 2")
if user=="March":
    print("Month Short form = Mar")
    print("Month Name = ",mar)
    print("Month Number = 3")  
if user=="April":
    print("Month Short form = Apr")
    print("Month Name = ",apr)
    print("Month Number = 4") 
if user=="May":
    print("Month Short form = May")
    print("Month Name = ",may)
    print("Month Number = 5")
if user=="June":
    print("Month Short form = Jun")
    print("Month Name = ",jun)
    print("Month Number = 6")
if user=="July":
    print("Month Short form = Jul")
    print("Month Name = ",jul)
    print("Month Number = 7")
if user=="August":
    print("Month Short form = Aug")
    print("Month Name = ",aug)
    print("Month Number = 8")
if user=="September":
    print("Month Short form = Sep")
    print("Month Name = ",sep)
    print("Month Number = 9")
if user=="October":
    print("Month Short form = Oct")
    print("Month Name = ",oct)
    print("Month Number = 10")   
if user=="November":
    print("Month Short form = Nov")
    print("Month Name = ",nov)
    print("Month Number = 11")
if user=="December":
    print("Month Short form = Dec")
    print("Month Name = ",dec)
    print("Month Number = 12")  
if user=="Jan":
    print("Month Short form = Jan")
    print("Month Name = ",jan)
    print("Month Number = 1")
if user=="Feb":
    print("Month Short form = Feb")
    print("Month Name = ",feb)
    print("Month Number = 2")
if user=="Mar":
    print("Month Short form = Mar")
    print("Month Name = ",mar)
    print("Month Number = 3")  
if user=="Apr":
    print("Month Short form = Apr")
    print("Month Name = ",apr)
    print("Month Number = 4") 
if user=="Jun":
    print("Month Short form = Jun")
    print("Month Name = ",jun)
    print("Month Number = 6")
if user=="Jul":
    print("Month Short form = Jul")
    print("Month Name = ",jul)
    print("Month Number = 7")
if user=="Aug":
    print("Month Short form = Aug")
    print("Month Name = ",aug)
    print("Month Number = 8")
if user=="Sep":
    print("Month Short form = Sep")
    print("Month Name = ",sep)
    print("Month Number = 9")
if user=="Oct":
    print("Month Short form = Oct")
    print("Month Name = ",oct)
    print("Month Number = 10")   
if user=="Nov":
    print("Month Short form = Nov")
    print("Month Name = ",nov)
    print("Month Number = 11")
if user=="Dec":
    print("Month Short form = Dec")
    print("Month Name = ",dec)
    print("Month Number = 12")
if user=="1":
    print("Month Short form = Jan")
    print("Month Name = ",jan)
    print("Month Number = 1")
if user=="2":
    print("Month Short form = Feb")
    print("Month Name = ",feb)
    print("Month Number = 2")
if user=="3":
    print("Month Short form = Mar")
    print("Month Name = ",mar)
    print("Month Number = 3")  
if user=="4":
    print("Month Short form = Apr")
    print("Month Name = ",apr)
    print("Month Number = 4") 
if user=="5":
    print("Month Short form = May")
    print("Month Name = ",may)
    print("Month Number = 5")
if user=="6":
    print("Month Short form = Jun")
    print("Month Name = ",jun)
    print("Month Number = 6")
if user=="7":
    print("Month Short form = Jul")
    print("Month Name = ",jul)
    print("Month Number = 7")
if user=="8":
    print("Month Short form = Aug")
    print("Month Name = ",aug)
    print("Month Number = 8")
if user=="9":
    print("Month Short form = Sep")
    print("Month Name = ",sep)
    print("Month Number = 9")
if user=="10":
    print("Month Short form = Oct")
    print("Month Name = ",oct)
    print("Month Number = 10")   
if user=="11":
    print("Month Short form = Nov")
    print("Month Name = ",nov)
    print("Month Number = 11")
if user=="12":
    print("Month Short form = Dec")
    print("Month Name = ",dec)
    print("Month Number = 12")
else:
    print()

print("Powered By eboostup.com")



Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
bottom of page