Message from Python discussions

December 2018

— Why dont you check the rules?

— 

Im learning from a tutorial and im given this task but they didnt provide solution but i managed to do something i need someone to review my code in relation to the question and score me

— So... where's your code to review it?

— YOUR

— Well, code review and unitary tests are different things

— Can I add it to my list to kill kitties?

— You can use a tool such as https://www.miniwebtool.com/leap-years-list/?start_year=1900&end_year=2020
To review it yourself
Also you can hastebin your code and let us review the style

Message permanent page

— Hastebin isn't working

— Share your code

— 

def IsYearLeap(year):
if (year % 4 == 0):
if (year % 100 == 0):
if (year % 400 == 0):
return True

IsYearLeap(2000)


#
# put your code here

testdata = [1900, 2000, 2016, 1987]
testresults = [False, True, True, False]
for i in range(len(testdata)):
yr = testdata[i]
print(yr,"->",end="")
result = IsYearLeap(yr)
print(i)
# print(result)

if result == testresults[i]:
print("OK")
else:
print("Failed")

Message permanent page

— Please how can use tkinter and turtle

— By reading about them