Hi all,

I’m VERY new to python; I’m trying to learn to code to do some maths work. So I’m looking to understand how to write certain functions/programs based around maths.

What I’d like to do is to start with a range of numbers the user specifies. Also, I’d like a list of just a single number to begin with. Then I’d like to run a test against each number in the original range, and each time, if certain conditions are met, the number from the range is added to the list of the (originally) single number. Then the next number from the range is tried against both numbers in the list. If it passes, it is also added to the list. If not, its discarded.

I hope that makes sense. Any help would be gratefully received. Once I figure this all out, I should be able to build on the principles for later.

Many thanks

Bob