How to solve the given problem?
Dennis Lee Bieber
wlfraed at ix.netcom.com
Thu Feb 10 13:37:12 EST 2022
On Wed, 9 Feb 2022 22:40:48 -0800 (PST), NArshad <narshad.380 at gmail.com>
declaimed the following:
>
>Assume that there is a pattern of feeding for a special fish in a day (10 hours a day) as below:
> 150 100 30 30 30 20 20 10 5 5
>Today, the fish is fed in the second hour 60 unit instead of 100 unit Accidently. Implement some methods to distribute the remaining 40 unit in the rest of the day and propose the new patterns. Try to keep the distribution similar to the current feeding pattern.
>Note: pay attention that the total feeding amounts should be fix in a day.
This is very obviously phrased as a homework problem. WE DO NOT DO
HOMEWORK!
Write some Python code, present the code, your input data, and the
output it produced along with an example of the output you expected, and we
may be able to point out what parts of Python you made a mistake with. If
we get ambitious we might even correct an algorithm, not just explain
errors in the usage of Python.
I'm going a tad too far but...
HINT:
You need to compute the percentage of remaining scheduled units each
takes, then apply those percentages to the left-over from the mis-feed.
NONE of this has anything to do with Python itself -- it is purely
algorithm development that applies with any programming language -- or even
none.
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed at ix.netcom.com http://wlfraed.microdiversity.freeddns.org/
More information about the Python-list
mailing list