Seasons of Love -Problem Set 8 (CS50's Introduction to Programming with Python)

preview_player
Показать описание
Hello, everyone and welcome to another video, in this video, I will explain and solve problem set 8, Seasons of Love.

if you haven't already submitted this problem, You have to try this on your own.
This video is to just give you a way to solve this problem, try solving it using a different approach, to get the most benefits out of this experience.

Don't forget to hit the like button and subscribe to the channel, and if you have any questions or want an explanation for a specific problem leave a comment down below.

Рекомендации по теме
Комментарии
Автор

Thanks bro what a life saver❤. Even copitol couldn't handle problem lol but yourse actually solved it

tonysu
Автор

thank you for the video but i thought of doing it with classes since that's what the lesson is about

benshomer
Автор

Bro, finally I have completed the course. Thanks for your help in this journey.

ashmitmishra
Автор

Bro, very helpful. Thank you so much for your valuable help

tiennguyenthuy
Автор

You should use class and you can subtracting a date from another and its return a timedelta object.

carlosleter
Автор

this is wgat i get in pytest. "During handling of the above exception, another exception occurred:...."

SolOccultuss
Автор

well done bro...
I think this could help with your testing, so you don't have to keep changing it

assert - 1)) == "Five hundred twenty-five thousand, six hundred"

assert - 2)) == "One million, fifty-one thousand, two hundred"

chukwuemekamusic
Автор

bro, my code keeps outputting "-" and "minus" along with the inputted date and I can't seem to figure out where it is coming from

godwinedacheodo
Автор

assertion Error : sixty minutest not sisxyminutes - skipping 52 identcal leading characters in diff, use -v to show

rsalehi
Автор

bruh, i came here to see why mine isn't recognized as correct by check50 even though it worked... turns out i didn't read the assignment properly and forgot andword="" . otherwise my program is more or less identical... anyways, thanks

leandercs
Автор

Hey guys pls what of those running this program in 2023. Almost all the checks for check50 fails

NgulefacJerry
Автор

yo bro .. the seasons.py passes all checks but the test have a problems .. i think its about the minutes_lived dates but i got the date from seasons.py

from seasons import minutes_lived

def main():
test_1()
test_2()

def test_1():
assert minutes_lived(2003, 5, 17) == "Ten million, one hundred fourteen thousand, five hundred sixty minutes"
assert minutes_lived(2000, 2, 1) == "Eleven million, eight hundred forty-four thousand minutes"

def test_2():
assert minutes_lived(23, 1, 2000) == "Invalid Date"

if __name__ == "__main__":
main()

rsalehi
Автор

My solution:

try:
birthdate = of Birth: "))
except:
sys.exit("Invalid date")
difference = date.today() - birthdate
age_minutes = difference.days * 24 * 60
p = inflect.engine()
+ " minutes")

Pnigro
welcome to shbcf.ru