Solve our code challenge and win a TV
At the end of which day do we need to move the fish to new tanks?
- Author
- Solution Seeker
- Publish date
- · 2 min read
200 000 fish at a weight of 150 g each is placed in the tank at the start of day 1. Each day, the fish grows by a percentage of its own body weight. Unfortunately, some fish is also lost due to diseases and similar.
If we have a tank with a radii of 12 meters and a height of 8 meters. How many days can we keep the fish in the tank before the density becomes more than 75 kg/m3, and we need to re-distribute the fish?
![](https://solutionseeker2021.imgix.net/images/Screenshot-2022-09-15-at-09.28.02.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=265&q=90&w=600&s=0747a6a44b523215aa954b5f73fd02e2 600w, https://solutionseeker2021.imgix.net/images/Screenshot-2022-09-15-at-09.28.02.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=309&q=90&w=700&s=0bdf59237a7fc4e2bca9d514979c6c12 700w, https://solutionseeker2021.imgix.net/images/Screenshot-2022-09-15-at-09.28.02.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=353&q=90&w=800&s=a18eeffb7791479734b37420abdddf06 800w, https://solutionseeker2021.imgix.net/images/Screenshot-2022-09-15-at-09.28.02.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=397&q=90&w=900&s=de292851fc8c14fbde967e8a191937ae 900w, https://solutionseeker2021.imgix.net/images/Screenshot-2022-09-15-at-09.28.02.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=441&q=90&w=1000&s=aa86374d17abcbf3e7ed217b0a153959 1000w, https://solutionseeker2021.imgix.net/images/Screenshot-2022-09-15-at-09.28.02.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=485&q=90&w=1100&s=4f21ae5d5beaa2ddade1f17ec57ddca4 1100w, https://solutionseeker2021.imgix.net/images/Screenshot-2022-09-15-at-09.28.02.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=529&q=90&w=1200&s=e0451b6579a3a76e6eb0c2027a800cb0 1200w, https://solutionseeker2021.imgix.net/images/Screenshot-2022-09-15-at-09.28.02.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=573&q=90&w=1300&s=7e703a87038649e77605c24eef188ee0 1300w, https://solutionseeker2021.imgix.net/images/Screenshot-2022-09-15-at-09.28.02.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=618&q=90&w=1400&s=232d3bb4b0c603bfcd4963debbcb3764 1400w, https://solutionseeker2021.imgix.net/images/Screenshot-2022-09-15-at-09.28.02.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=662&q=90&w=1500&s=85995434d79760eedd527f16aae0af5c 1500w, https://solutionseeker2021.imgix.net/images/Screenshot-2022-09-15-at-09.28.02.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=706&q=90&w=1600&s=95093e88bf672577234d0f74a2805689 1600w, https://solutionseeker2021.imgix.net/images/Screenshot-2022-09-15-at-09.28.02.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=750&q=90&w=1700&s=b0eaa7c78f4ca0869994d297409a26a1 1700w, https://solutionseeker2021.imgix.net/images/Screenshot-2022-09-15-at-09.28.02.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=794&q=90&w=1800&s=7ab91f196dd42cfb75f26b30266cdbb9 1800w, https://solutionseeker2021.imgix.net/images/Screenshot-2022-09-15-at-09.28.02.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=838&q=90&w=1900&s=1a033efa784372b2dcf380f8062e18dc 1900w, https://solutionseeker2021.imgix.net/images/Screenshot-2022-09-15-at-09.28.02.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=882&q=90&w=2000&s=d8630a380e7ee20dcf6877ad05e8d41d 2000w, https://solutionseeker2021.imgix.net/images/Screenshot-2022-09-15-at-09.28.02.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=926&q=90&w=2100&s=654493b5daa38c4e80a29e637115e2b2 2100w, https://solutionseeker2021.imgix.net/images/Screenshot-2022-09-15-at-09.28.02.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=970&q=90&w=2200&s=0219d1ac675c6aed67f78f7d2866be25 2200w, https://solutionseeker2021.imgix.net/images/Screenshot-2022-09-15-at-09.28.02.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=1014&q=90&w=2300&s=58e84ce0b1e3db8d760caabebd2a2c1f 2300w, https://solutionseeker2021.imgix.net/images/Screenshot-2022-09-15-at-09.28.02.png?auto=compress%2Cformat&crop=focalpoint&cs=srgb&fit=crop&fp-x=0.5&fp-y=0.5&h=1059&q=90&w=2400&s=b4c561669d284ebec630fee9a10c7ae4 2400w)
Solve the challenge using whatever method you like. Can even be solved using paper, though probably tedious and not recommended. Perhaps Excel is an alternative? Anyways, a Python implementation with utility functions is provided below. If familiar with Python, the challenge is probably most efficient to solve using your own Python installation (pandas package is the only external package needed) or Google Colab.
- Code
-
Python implementation with problem configuration and utility functions. Implement get_num_days_before_full() to solve the challenge
Link - Growth data
-
How many percent of it's own body weight a fish is expected to grow from one day to the next, given the weight [g] of the fish
Link - Mortality data
-
Of the fish that is lost, how many percent of these are lost before they reach a given weight [g]
Link
Note: we allow some slack in the answer (+- a couple of days)
Good luck! Submit your answer (number of days) to knut.v.eriksen@solutionseeker.no!