1. Learn
  2. /
  3. Courses
  4. /
  5. Software Engineering Principles in Python

Connected

Exercise

Adding functionality to your package

Thanks to your work before, you already have a skeleton for your python package. In this exercise, you will work to define the functions needed for a text analysis of word usage.

In the file counter_utils.py, you will write 2 functions to be a part of your package: plot_counter and sum_counters. The structure of your package can be seen in the tree below. For the coding portions of this exercise, you will be working in the file counter_utils.py.

text_analyzer
├── __init__.py
└── counter_utils.py

Instructions 1/3

undefined XP
    1
    2
    3
  • Define top_items using plot_counter's inputs.