Spring Deals - hours only!Up to 70% off on all courses and bundles.-Close
Recap
Tuples as return types in functions
Tuples as records
List of tuples
Summary
17. Question 2

Instruction

Great job! Ready for the next exercise?

Exercise

Write a function named get_weight_stats(list_a, list_b). The two arguments are lists with body weights expressed as float values. The template code presents an example of such lists. Both lists represent the weight values of the same people at two different points in time.

Your task is to analyze the weight values, element by element, and return a tuple with three counts: (the number of people who lost weight, the number of people with identical weight, and the number of people who gained weight).