+ 3
SOLVED | sololearn code coach. days between dates. help please 🥺.5th test can't be passed
You need to calculate exactly how many days have passed between two dates. Task: Calculate how many days have passed between two input dates, and output the result. Input Format: Two strings that represent the dates, first date should be the older date. Date format: Month DD, YYYY Output Format: A number representing the number of days between the two dates. Sample Input: August 15, 1979 June 15, 2018 Sample Output: 14184 https://code.sololearn.com/cSPZ7z56GehY/?ref=app I've seeked an error quite long but haven't found any.
9 Respuestas
+ 3
I think the issue is near the leap year calculation but at this rate I would suggest to convert both date inputs to DateTime, substract one from the other and then print the Days attribute of the result
+ 1
for me yes, but checking algorithm of Sololearn thinks no. in 5th test, this code don't print an expected result from sl
+ 1
what do u mean? u can't find this task?
+ 1
Check out your leap year calculation once again..
Ex: Is 2000 leap year or not? it's a leap year.
+ 1
yes
+ 1
YuGiMob I'm not a pro & can access it
0
What error are you talking about?
The code produces the desired result.
0
Can't find this job 🤔
0
Huh? How can you have access to this code coach if thats only for pro users?