GH avatar Bite 19. Write a simple property

Write a simple Promo class. Its constructor receives a name str and expires datetime.

Add a property called expired which returns a boolean value indicating whether the promo has expired or not.

Checkout the tests and datetime module for more info. Have fun!

go back Beginner level
Bitecoin 2X

445 out of 467 users completed this Bite.
Will you be Pythonista #446 to crack this Bite?
Resolution time: ~33 min. (avg. submissions of 5-240 min.)
Pythonistas rate this Bite 4.88 on a 1-10 difficulty scale.
» Up for a challenge? 💪

Buy Now Login and get coding
We use Python 3.7