+ 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.

26th Jul 2022, 2:34 PM
dottxt | off
dottxt | off - avatar
9 Antworten
+ 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
28th Jul 2022, 6:20 AM
YuGiMob
YuGiMob - avatar
+ 1
for me yes, but checking algorithm of Sololearn thinks no. in 5th test, this code don't print an expected result from sl
26th Jul 2022, 3:35 PM
dottxt | off
dottxt | off - avatar
+ 1
what do u mean? u can't find this task?
26th Jul 2022, 6:38 PM
dottxt | off
dottxt | off - avatar
+ 1
Check out your leap year calculation once again.. Ex: Is 2000 leap year or not? it's a leap year.
26th Jul 2022, 7:39 PM
Jayakrishna 🇮🇳
+ 1
yes
26th Jul 2022, 8:03 PM
Solo
Solo - avatar
+ 1
YuGiMob I'm not a pro & can access it
27th Jul 2022, 4:04 PM
dottxt | off
dottxt | off - avatar
0
What error are you talking about? The code produces the desired result.
26th Jul 2022, 3:27 PM
Solo
Solo - avatar
0
Can't find this job 🤔
26th Jul 2022, 5:27 PM
Solo
Solo - avatar
0
Huh? How can you have access to this code coach if thats only for pro users?
27th Jul 2022, 4:04 PM
YuGiMob
YuGiMob - avatar