"Given a month - an integer from 1 to 12, print the number of days in it in the year 2017." Code Answer's
You're definitely familiar with the best coding language Whatever that developers use to develop their projects and they get all their queries like "Given a month - an integer from 1 to 12, print the number of days in it in the year 2017." answered properly. Developers are finding an appropriate answer about Given a month - an integer from 1 to 12, print the number of days in it in the year 2017. related to the Whatever coding language. By visiting this online portal developers get answers concerning Whatever codes question like Given a month - an integer from 1 to 12, print the number of days in it in the year 2017.. Enter your desired code related query in the search bar and get every piece of information about Whatever code related question on Given a month - an integer from 1 to 12, print the number of days in it in the year 2017..
Given a month - an integer from 1 to 12, print the number of days in it in the year 2017.
month = int (input ('month (1-12): '))
if month < 13:
if month == 2:
year = int (input ('year: '))
if year % 4 == 0:
if year % 100 == 0:
if year % 400 == 0:
print ('29')
else:
print ('28')
else:
print ('29')
else:
print ('28')
elif month >= 8:
if month % 2 == 0:
print ('31')
else:
print ('30')
elif month % 2 == 0:
print ('30')
else:
print ('31')
else:
print ('Only 1-12 accepted')
Source: stackoverflow.com
All those coders who are working on the Whatever based application and are stuck on Given a month - an integer from 1 to 12, print the number of days in it in the year 2017. can get a collection of related answers to their query. Programmers need to enter their query on Given a month - an integer from 1 to 12, print the number of days in it in the year 2017. related to Whatever code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about Given a month - an integer from 1 to 12, print the number of days in it in the year 2017. for the programmers working on Whatever code while coding their module. Coders are also allowed to rectify already present answers of Given a month - an integer from 1 to 12, print the number of days in it in the year 2017. while working on the Whatever language code. Developers can add up suggestions if they deem fit any other answer relating to "Given a month - an integer from 1 to 12, print the number of days in it in the year 2017.". Visit this developer's friendly online web community, CodeProZone, and get your queries like Given a month - an integer from 1 to 12, print the number of days in it in the year 2017. resolved professionally and stay updated to the latest Whatever updates.