Login and get codingWrite a simple
Promo
class. Its constructor receives two variables:name
(which must be a string) andexpires
(which must be adatetime
object).Add a
property
calledexpired
which returns a boolean value indicating whether the promo has expired or not.Checkout the tests and
datetime
module for more info. Have fun!
1057 out of 1129 users completed this Bite.
Will you be Pythonista #1058 to crack this Bite?
Resolution time: ~36 min. (avg. submissions of 5-240 min.)
Pythonistas rate this Bite 4.5 on a 1-10 difficulty scale.
» Up for a challenge? 💪