0

So I am trying to think of how I can list all possible combinations of 5 variables (that have a set value AND a second property, like a charge for example, so for example I would have x = 100 and has a charge state of +1) with different factors to each variable (so x can vary between 1 and 4, y only between 1 and 2). At the end I would like to have a list with the combination of variables and the summed value of all like this: 4x+2y+3*z = 1400 (3+)

Is this possible? I am trying to wrap my head around this or if there are too many variables in this. I am a beginner, so explain it like I am dumb.

Thx

TheChemist
  • 153
  • 1
  • 8
  • Does this answer your question? [How to get all possible combinations of a list’s elements?](https://stackoverflow.com/questions/464864/how-to-get-all-possible-combinations-of-a-list-s-elements) – Solar Mike May 17 '22 at 07:52
  • it kinda goes in the right direction but how would I go on multiplying the list elements and then returning two values for each combination? – TheChemist May 17 '22 at 08:06

0 Answers0