How to take group of numbers summed in groups of 3... - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: How to take group of numbers summed in groups of 3... (/thread-26534.html) |
How to take group of numbers summed in groups of 3... - jaguare22 - May-05-2020 Hello, I'm very new to coding but already have a practical need. This is way over my head but I thought I'd see if someone might be interested in helping me out. I have 48 numbers. I need to know if any combination of those numbers, arranged as a group of 3, will be equal to a set 16 other numbers +/- .02. I'd like to see output in 2 categories, exact match and within tolerance. Any and all help appreciated, and if this is inappropriate, let me know, I'll take it down. Thanks. RE: How to take group of numbers summed in groups of 3... - Yoriz - May-05-2020 To get started, to make a combination take a look at the Combinatoric iterators of https://docs.python.org/3/library/itertools.html |