# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# + jupyter={"outputs_hidden": false}
# %run quiz_2.py
# -

# ---
# #### Run the following cell to load question 1.

q1

# + [markdown] jupyter={"outputs_hidden": false}
# ##### Do your work in the following cell. Then answer the question.
# -



# ---
# #### Run the following cell to load question 2.

q2

# + [markdown] jupyter={"outputs_hidden": false}
# ##### Do your work in the following cell. Then answer the question.

# + jupyter={"outputs_hidden": false}

# -

# ---
# ### Problem
# Write a check to make sure that there are no age groups in which the number of females plus the number of males does not add up to the total number of people that age in 2019.



# ---
# ### Help with Question 2
# Get the number of years lived by the people alive in 2019 and then divide that by the number of people alive in 2019.
#
# #### To get the number of people alive in 2019:
# 1. First get a `DataFrame` that only contains the rows that contain data for both sexes (i.e., where `SEX == 'T'`).
# 1. Get the sum of the `POPESTIMATE2019` column values.
#
# #### To get the total years lived by the people alive in 2019:
# 1. Use element-wise multiplication to create a `Series` by multiplying `POPESTIMATE2019` by `AGE`.
# 1. Get the sum of that series.

StarcoderdataJupyterScriptsDedupFiltered