On Wed, 9 Feb 2022 22:40:48 -0800 (PST), NArshad <narshad....@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 wlfr...@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/ -- https://mail.python.org/mailman/listinfo/python-list