Skip to the content.

Popcorn Hack Completion Blog

My popcorn hack blog

Popcorn Hack 1:

Question: Which of the following actions are likely to be helpful in reducing the digital divide? Select two answers.

Options:

  1. Designing new technologies intended only for advanced users This would likely increase the digital divide because it would cater only to a specific group of users who already have advanced skills, rather than helping bridge the gap for others.

  2. Designing new technologies to be accessible to individuals with different physical abilities This is a good choice. Making technologies accessible to individuals with different physical abilities ensures that a larger portion of the population can use and benefit from them.

  3. Implementing government regulations restricting citizens’ access to Web content This would likely worsen the digital divide, as restricting access to information could make it harder for marginalized groups to learn and participate in the digital world.

  4. Having world governments support the construction of network infrastructure This is another great choice. Providing support for network infrastructure can help expand internet access to underserved areas, reducing the digital divide.

Correct answers:

  1. Designing new technologies to be accessible to individuals with different physical abilities

  2. Having world governments support the construction of network infrastructure

Explanation: These actions help reduce the digital divide by making technology usable for a broader population and ensuring internet access is available in more areas. Accessible design allows people with disabilities to engage with technology, while government support for infrastructure improves connectivity in underserved regions.

Popcorn Hack 2:

How would you attempt to fix the digital divide or prevent it from being as prevalent in our community? What are some things that are already being done? What are some things we can add? Explain.

To address the digital divide, I would focus on improving access to both technology and education. Here are a few steps to tackle this issue:

What’s already being done:

Government programs: Some governments have started initiatives to expand broadband internet access, especially in rural and underserved areas, to reduce the access gap. Programs like E-Rate in the U.S. help bring internet access to schools and libraries in underserved communities.

Non-profit organizations: Many organizations work to provide affordable technology to low-income families and promote digital literacy programs, such as One Laptop Per Child or Tech Goes Home.

What can be added:

Subsidized or free internet programs: Expanding internet affordability for low-income communities could have a huge impact. Local governments or organizations could partner with ISPs to offer subsidized or free internet access to low-income households.

Digital literacy education: Providing educational programs to help people learn how to use technology safely and effectively is crucial. This could be done through after-school programs, online courses, or community centers.

Mobile technology solutions: In many areas, mobile phones are the only access to the internet. Designing mobile-first solutions for learning, job searching, and government services could help bridge the gap.

Collaboration with tech companies: Technology companies could collaborate more with schools and community centers to provide access to devices, like laptops or tablets, and even offer online coding, digital design, or STEM workshops.

By implementing these measures, we can work to ensure everyone has the opportunity to participate in the digital world, helping to reduce the digital divide.

import sys
print(sys.executable)
/bin/python
!pip install -r pandas
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
    
    See /usr/share/doc/python3.12/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
import pandas as pd

data = pd.read_csv("internet_users.csv").drop(columns=['Notes', 'Year.2', 'Users (CIA)', 'Rate (ITU)', 'Year.1']) # Drop extra columns: we will not be using these

data_cleaned = data.dropna() # Drop rows with NaN (aka blank) values

print(data_cleaned.head()) # Display the first few rows of the cleaned data

# print(len(data)) # Check num of rows before removing blank rows
# print(len(data_cleaned)) # Check num of rows after removing blank rows
     
---------------------------------------------------------------------------

FileNotFoundError                         Traceback (most recent call last)

Cell In[3], line 3
      1 import pandas as pd
----> 3 data = pd.read_csv("internet_users.csv").drop(columns=['Notes', 'Year.2', 'Users (CIA)', 'Rate (ITU)', 'Year.1']) # Drop extra columns: we will not be using these
      5 data_cleaned = data.dropna() # Drop rows with NaN (aka blank) values
      7 print(data_cleaned.head()) # Display the first few rows of the cleaned data


File /usr/lib/python3/dist-packages/pandas/io/parsers/readers.py:948, in read_csv(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, skipfooter, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, date_format, dayfirst, cache_dates, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, doublequote, escapechar, comment, encoding, encoding_errors, dialect, on_bad_lines, delim_whitespace, low_memory, memory_map, float_precision, storage_options, dtype_backend)
    935 kwds_defaults = _refine_defaults_read(
    936     dialect,
    937     delimiter,
   (...)
    944     dtype_backend=dtype_backend,
    945 )
    946 kwds.update(kwds_defaults)
--> 948 return _read(filepath_or_buffer, kwds)


File /usr/lib/python3/dist-packages/pandas/io/parsers/readers.py:611, in _read(filepath_or_buffer, kwds)
    608 _validate_names(kwds.get("names", None))
    610 # Create the parser.
--> 611 parser = TextFileReader(filepath_or_buffer, **kwds)
    613 if chunksize or iterator:
    614     return parser


File /usr/lib/python3/dist-packages/pandas/io/parsers/readers.py:1448, in TextFileReader.__init__(self, f, engine, **kwds)
   1445     self.options["has_index_names"] = kwds["has_index_names"]
   1447 self.handles: IOHandles | None = None
-> 1448 self._engine = self._make_engine(f, self.engine)


File /usr/lib/python3/dist-packages/pandas/io/parsers/readers.py:1705, in TextFileReader._make_engine(self, f, engine)
   1703     if "b" not in mode:
   1704         mode += "b"
-> 1705 self.handles = get_handle(
   1706     f,
   1707     mode,
   1708     encoding=self.options.get("encoding", None),
   1709     compression=self.options.get("compression", None),
   1710     memory_map=self.options.get("memory_map", False),
   1711     is_text=is_text,
   1712     errors=self.options.get("encoding_errors", "strict"),
   1713     storage_options=self.options.get("storage_options", None),
   1714 )
   1715 assert self.handles is not None
   1716 f = self.handles.handle


File /usr/lib/python3/dist-packages/pandas/io/common.py:863, in get_handle(path_or_buf, mode, encoding, compression, memory_map, is_text, errors, storage_options)
    858 elif isinstance(handle, str):
    859     # Check whether the filename is to be opened in binary mode.
    860     # Binary mode does not support 'encoding' and 'newline'.
    861     if ioargs.encoding and "b" not in ioargs.mode:
    862         # Encoding
--> 863         handle = open(
    864             handle,
    865             ioargs.mode,
    866             encoding=ioargs.encoding,
    867             errors=errors,
    868             newline="",
    869         )
    870     else:
    871         # Binary mode
    872         handle = open(handle, ioargs.mode)


FileNotFoundError: [Errno 2] No such file or directory: 'internet_users.csv'
import pandas as pd

# Load and clean the data
data = pd.read_csv("internet_users.csv").drop(columns=['Notes', 'Year.2', 'Users (CIA)', 'Rate (ITU)', 'Year.1'])
data_cleaned = data.dropna()  # Remove rows with missing values

# Extract relevant columns
y = data_cleaned['Rate (WB)']  # Internet usage percentage
name = data_cleaned['Location']  # Country names

# Loop through the data and print the required output
for country, rate in zip(name, y):
    status = "doing great" if rate > 70 else "needs improvement"
    print(f"{country}: {rate}%: {status}")

---------------------------------------------------------------------------

FileNotFoundError                         Traceback (most recent call last)

Cell In[1], line 4
      1 import pandas as pd
      3 # Load and clean the data
----> 4 data = pd.read_csv("internet_users.csv").drop(columns=['Notes', 'Year.2', 'Users (CIA)', 'Rate (ITU)', 'Year.1'])
      5 data_cleaned = data.dropna()  # Remove rows with missing values
      7 # Extract relevant columns


File /usr/lib/python3/dist-packages/pandas/io/parsers/readers.py:948, in read_csv(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, skipfooter, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, date_format, dayfirst, cache_dates, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, doublequote, escapechar, comment, encoding, encoding_errors, dialect, on_bad_lines, delim_whitespace, low_memory, memory_map, float_precision, storage_options, dtype_backend)
    935 kwds_defaults = _refine_defaults_read(
    936     dialect,
    937     delimiter,
   (...)
    944     dtype_backend=dtype_backend,
    945 )
    946 kwds.update(kwds_defaults)
--> 948 return _read(filepath_or_buffer, kwds)


File /usr/lib/python3/dist-packages/pandas/io/parsers/readers.py:611, in _read(filepath_or_buffer, kwds)
    608 _validate_names(kwds.get("names", None))
    610 # Create the parser.
--> 611 parser = TextFileReader(filepath_or_buffer, **kwds)
    613 if chunksize or iterator:
    614     return parser


File /usr/lib/python3/dist-packages/pandas/io/parsers/readers.py:1448, in TextFileReader.__init__(self, f, engine, **kwds)
   1445     self.options["has_index_names"] = kwds["has_index_names"]
   1447 self.handles: IOHandles | None = None
-> 1448 self._engine = self._make_engine(f, self.engine)


File /usr/lib/python3/dist-packages/pandas/io/parsers/readers.py:1705, in TextFileReader._make_engine(self, f, engine)
   1703     if "b" not in mode:
   1704         mode += "b"
-> 1705 self.handles = get_handle(
   1706     f,
   1707     mode,
   1708     encoding=self.options.get("encoding", None),
   1709     compression=self.options.get("compression", None),
   1710     memory_map=self.options.get("memory_map", False),
   1711     is_text=is_text,
   1712     errors=self.options.get("encoding_errors", "strict"),
   1713     storage_options=self.options.get("storage_options", None),
   1714 )
   1715 assert self.handles is not None
   1716 f = self.handles.handle


File /usr/lib/python3/dist-packages/pandas/io/common.py:863, in get_handle(path_or_buf, mode, encoding, compression, memory_map, is_text, errors, storage_options)
    858 elif isinstance(handle, str):
    859     # Check whether the filename is to be opened in binary mode.
    860     # Binary mode does not support 'encoding' and 'newline'.
    861     if ioargs.encoding and "b" not in ioargs.mode:
    862         # Encoding
--> 863         handle = open(
    864             handle,
    865             ioargs.mode,
    866             encoding=ioargs.encoding,
    867             errors=errors,
    868             newline="",
    869         )
    870     else:
    871         # Binary mode
    872         handle = open(handle, ioargs.mode)


FileNotFoundError: [Errno 2] No such file or directory: 'internet_users.csv'