Git Product home page Git Product logo

Comments (3)

zzwu29 avatar zzwu29 commented on May 22, 2024

from 100daysofcode-with-python-course.

bbelderbos avatar bbelderbos commented on May 22, 2024

Hey @OneThirtySeven I quickly checked and this is not an exercise bug, it's a failing submission.

where None = get_hundred_days_end_date() means you are not returning anything from the function.

Change your prints to returns and that fixes that issue.

There is another problem to fix (you're close!), it has to do with the return type of get_days_between_pb_start_first_joint_pycon() - you have str, but as per the test it needs to be int(hint: you can calldayson atimedelta` object ...)

HTH
Bob

from 100daysofcode-with-python-course.

II-Tom-Cat-II avatar II-Tom-Cat-II commented on May 22, 2024

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 = str(start_100days + end_date)

return finish_day

def get_days_between_pb_start_first_joint_pycon():
"""Return the int number of days"""
t1 = (pycon_date - pybites_founded).days

return t1

fin_day = get_hundred_days_end_date()
between_day = get_days_between_pb_start_first_joint_pycon()

print("The finish date is ", fin_day)
print("The days in between the founded day and pycon day is",between_day, "days")

##Passed!!

from 100daysofcode-with-python-course.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.