Pybites Logo

Scoring objects

Level: Intermediate (score: 3)

In this Bite you are going to score objects:

Object type Points
builtin 1
keyword 2
module 3


Complete score_objects that receives a list of objects and a scores dictionary (as shown above and provided in the template code).

For each str in the objects list passed in, see if it's any of a builtin, a keyword or a module and add the appropriate score to the total int you have to return from the function.

These checks can all be done with modules in the Standard Library, nothing external is needed.

Good luck and keep calm and code in Python!