Skip to content

Instantly share code, notes, and snippets.

@adeisbright
Last active January 12, 2025 11:53
Show Gist options
  • Save adeisbright/4a798c365f7de7085ce6e9d42905cac6 to your computer and use it in GitHub Desktop.
Save adeisbright/4a798c365f7de7085ce6e9d42905cac6 to your computer and use it in GitHub Desktop.
Problem solving mindset and implementing with python

Food Scarcity, Food Distribution, and Population Control

A hypothetical community is facing issues with food scarcity .

In a given day, people within the community will be complaining about lack of food because available food is depleted quickly

Another reason for this issue is absence of planning .

The community managers do not know the total number of people in the community.

The town sits in a location that makes people from other communities pour in.

They usually come in during the early hours of each day, and then buy most of the food available.

To solve this problem, the leaders have decide to do the following :

  1. Create a register of everyone in the community and note the quantity of food they need for a day
  2. Estimate the total food distribution available per day based on food vendors data
  3. Find a way to efficiently distribute the food to the locals
  4. Determine an optimum amount of foreigners to allow into the community based on a food to people index . The higher the index, the more foreigners that are allowed

The community has reached out to you to help them solve this problem.

How will you help them out using your problem solving skill and Python as a language to implement it ?

This will be our focus for today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment