Created
August 15, 2017 15:27
-
-
Save LivingInSyn/91ac2da2534c6d054bf8efdd5d1d7855 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
month30 = [4, 6, 9, 11] | |
month31 = [1, 3, 5, 7, 8, 10, 12] | |
for year in range(17,100): | |
for month in range(1,13): | |
if month in month30: | |
upper = 31 | |
elif month in month31: | |
upper = 32 | |
else: | |
if year % 4 == 0: | |
upper = 30 | |
else: | |
upper = 29 | |
for day in range(1,upper): | |
if (day**2 + month ** 2) == (year ** 2): | |
print("Year: {}, Month: {}, Day: {}".format(year, month, day)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment