human
Program to calculate the number of odd days in given number of years | Function to return the count of odd days.
Count of years divisible by 100 and 400.
Every 4 th year is a leap year.
Every 100 th year is divisible by 4 but is not a leap year.
Every 400 th year is divisible by 100 but is a leap year.
Total number of extra days.
modulo ( 7 ) for final answer.
Number of days"
Solution in Python:
 Give me a code to program to calculate the number of odd days in given number of years and the other steps required?
assistant
#Here is code to program to calculate the number of odd days in given number of years and the other steps required.
 def oddDays ( N ) :
	hund1 = N // 100
	hund4 = N // 400
	leap = N >> 2
	ordd = N - leap
	if ( hund1 ) :
		ordd += hund1
		leap -= hund1
	if ( hund4 ) :
		ordd -= hund4
		leap += hund4
	days = ordd + leap * 2
	odd = days % 7
	return odd
N = 100
print ( oddDays ( N ) )