In this particular instance, I would rather write down the loop.
It is not hard to make the loop general for any bound on x and
y and any sum.

sum = 15
xmin = 1
xmax = 9
ymin = 1
ymax = 9
for x in range(max(xmin, sum-ymax), min(xmax, sum-ymin)+1):
    print(x, sum-x)

which does run through

6 9
7 8
8 7
9 6


Le 17/04/2020 à 18:55, Bert Henry a écrit :
I have the equation
x + y = 15
an I'm looking for solution only in the range x=1..9 and y=1..9, x and y
both integer
Is there a sage-command to do that?

Thanks in advance
Bert Henry


--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/28ad653e-61af-bd18-73e3-e58df1bf282a%40gmail.com.

Reply via email to