Posts by RODRIGO ZAMENGO • 7 points
2 posts
-
-1
votes2
answers159
viewsA: I would like to know all the combinations of 5 numbers between 0 and 100 that add up to 100
I found this code, which presents all possible combinations for 0 to 100 in the 5 "houses", but I couldn’t get it to list only the values that add up to 100. import itertools for i in…
pythonanswered RODRIGO ZAMENGO 7 -
-2
votes2
answers159
viewsQ: I would like to know all the combinations of 5 numbers between 0 and 100 that add up to 100
Good night, I need to find all combinations of 5 natural numbers, between 0 and 100 (can be 0,0,0,100 (can repeat)) that sum up to 100, I adapted the code below to do this, but for some reason the…
pythonasked RODRIGO ZAMENGO 7