Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Simple solution in Clear category for When is Friday? by mohamedsleymi2016
from datetime import datetime
friday = lambda day:{0:4,1:3,2:2,3:1,4:0,5:6,6:5}[datetime.strptime(day ,'%d.%m.%Y').weekday()]
if __name__ == '__main__':
print("Example:")
print(friday('12.04.2018'))
#These "asserts" using only for self-checking and not necessary for auto-testing
assert friday('23.04.2018') == 4
assert friday('01.01.1999') == 0
print("Coding complete? Click 'Check' to earn cool rewards!")
Feb. 6, 2021
Comments: