Editor

Find the Digital Divide Gap

Beginner · Write the code · from Effects of Computing: Benefits, Harms and the Digital Divide

From the lesson: Effects of Computing: Benefits, Harms and the Digital Divide

People create computing innovations to do one job well, and those innovations then change how everyone works, plays and learns in ways their creators never fully planned. Think about how everyday tasks have changed. Homework goes through an online portal instead of a paper stack on the teacher's desk.

Read the lesson

Write digital_divide_gap(rates). rates is a dictionary that maps each group's name to the percent of that group with internet access. Return the gap in percentage points between the group with the highest rate and the group with the lowest.

digital_divide_gap({"urban": 92, "suburban": 89, "rural": 72})  ->  20
def digital_divide_gap(rates):
# rates maps group name -> percent with internet access
pass

What Check runs

Your code runs first, then each of these lines, and 2 more that stay hidden. The output must match exactly.

RunsExpected output
print(digital_divide_gap({"urban": 92, "suburban": 89, "rural": 72}))20
print(digital_divide_gap({"ages 18-29": 97, "ages 65+": 75}))22

More Effects of Computing exercises

All Python exercises · 50 practice problems