• This week's mission: Next Birthday

checkio

Hello CheckiO users! 🙂

💪 Challenge yourself with our latest mission:

The mission is called Next Birthday created by Phil15 and here you need to find the number of days from today to the closest birthday of one of the family members along with their age.

birthdates = {
    'Brian': (1967, 5, 31),
    'Léna': (1970, 10, 3),
    'Philippe': (1991, 6, 15),
    'Yasmine': (1996, 2, 29),
    'Emma': (2000, 12, 25),
}
next_birthday((2020, 9, 8), birthdates) == (25, {'Léna': 50})
next_birthday((2021, 10, 4), birthdates) == (82, {'Emma': 21})
next_birthday((2022, 3, 1), birthdates) == (0, {'Yasmine': 26})
    💡 Highlights from the world of Python:
  • Python 3.9 is around the corner, so you might wanna get a head start on it’s final release! Python 3.9 will come with new operators for dictionary unions, a new parser, two string operations meant to eliminate some longstanding confusion, as well as improved time-zone handling and type hinting. There are a lot of interesting things worth checking out!
  • Get an amazing insight on 9 Python 3 features you might not use yet along with clear code examples! These illustrations of uncommon traits that can only be found in Python 3 can really be useful, if you intend to keep up with Python updates.
  • Find out Everything You Need to Know About Python's Namedtuples, starting from the very basics and moving up to more complex concepts. You’ll learn why you should use them, how to convert regular tuples and dictionaries into Namedtuples, as well as a namedtuple to dictionary or regular tuple, create Namedtuples with optionals fields, sort a list of Namedtuples, and, among other things, you’ll see how they can make your code cleaner.

🏋 The users who’ve made the TOP 3 this month are Stensen, dan_s, and rossras. You are doing great, guys! Keep on coding!

Welcome to CheckiO - games for coders where you can improve your codings skills.

The main idea behind these games is to give you the opportunity to learn by exchanging experience with the rest of the community. Every day we are trying to find interesting solutions for you to help you become a better coder.

Join the Game