-
Notifications
You must be signed in to change notification settings - Fork 1.1k
day 2 error #58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
您好,您的邮件我已经收到,会尽快阅读并回复!
zzWu
|
Hey @OneThirtySeven I quickly checked and this is not an exercise bug, it's a failing submission.
Change your There is another problem to fix (you're close!), it has to do with the return type of HTH |
from datetime import date, timedelta start_100days = date(2017, 3, 30) def get_hundred_days_end_date():
def get_days_between_pb_start_first_joint_pycon():
fin_day = get_hundred_days_end_date() print("The finish date is ", fin_day) ##Passed!! |
Hello,
I am trying to figure out what went wrong with my code for the day 2 challenge. I am pretty sure the result is correct.
Which for challenge one is 2017. 07.08 and 505 days for challenge 2.
Challenge :
My code :
from datetime import date, timedelta
start_100days = date(2017, 3, 30)
pybites_founded = date(2016, 12, 19)
pycon_date = date(2018, 5, 8)
def get_hundred_days_end_date():
"""Return a string of yyyy-mm-dd"""
end_date=timedelta(days=100)
finish_day = start_100days + end_date
def get_days_between_pb_start_first_joint_pycon():
"""Return the int number of days"""
in_between_days = pycon_date - pybites_founded
print(str(in_between_days))
get_hundred_days_end_date()
get_days_between_pb_start_first_joint_pycon()
error return :
============================= test session starts ==============================
platform linux -- Python 3.8.13, pytest-5.4.2, py-1.8.1, pluggy-0.13.1
rootdir: /tmp
plugins: asyncio-0.12.0
2017-07-08
505 days, 0:00:00
collected 2 items
../../tmp/test_calc_dts.py 2017-07-08
F505 days, 0:00:00
F
=================================== FAILURES ===================================
________________________ test_get_hundred_days_end_date ________________________
E AssertionError: assert None == '2017-07-08'
E + where None = get_hundred_days_end_date()
/tmp/test_calc_dts.py:6: AssertionError
_______________________ test_get_days_till_pycon_meetup ________________________
E assert None == 505
E + where None = get_days_between_pb_start_first_joint_pycon()
/tmp/test_calc_dts.py:10: AssertionError
=========================== short test summary info ============================
FAILED ../../tmp/test_calc_dts.py::test_get_hundred_days_end_date - Assertion...
FAILED ../../tmp/test_calc_dts.py::test_get_days_till_pycon_meetup - assert N...
============================== 2 failed in 0.07s ===============================
The text was updated successfully, but these errors were encountered: