May-08-2017, 08:58 PM
(May-08-2017, 08:40 PM)ichabod801 Wrote: I'm not sure what you need as the result. Do you need a list of the subtractions of the pairs of squares, or do you need to start at 1000^2 and subtract all of the other squares from that to get one final number? I'm guessing you want the latter. In that case, you would initialize Answer to 1000 ** 1000. Then loop down from 990, subtracting and storing the new result in Answer. Note that z is not a sequence, it is an integer. So z[z] will give you an error. You just want z ** z.Thank you for your reply! Yes, I need the later - just the final number. Can you please clarify how can I store the result and go further (to another integer)?
Best regards,
Alberto