Create 3 instances and read the count
Input
make_instances_and_get_count(3)
Output
3
reset_count is called by the helper, then three instances are created; get_count returns 3.
Full lesson preview
Learn how to use a class method and a class variable to keep track of how many instances of a class have been created.
Problem statement
Task
Examples
Input
make_instances_and_get_count(3)
Output
3
reset_count is called by the helper, then three instances are created; get_count returns 3.
Input format
Output format
Constraints
Samples
Input
make_instances_and_get_count(0)
Output
0
Creating zero instances should leave the counter at zero.