The optional life expectancy question

This is my solution but i am not sure if i am using the right formula. the instruction say use population as weight but i did not use weight here.
will my calculation be right or wrong. Below is my formula and my answer is
72.47942857142857

`life_exp = countries_df[“life_expectancy”].sum() / len(countries_df[“life_expectancy”])

please help

2 posts were merged into an existing topic: Assignment 3 - Pandas Practice