While Loop Works then doesn't.

That code makes no sense. Presumably you are trying to say that you want to loop while 'numberone' is equal to one of those values but you have two issues:

1. That's not a valid condition for a While loop.
2. 'numberone' never has any of those values.

Where do you ever assign any value to 'numberone'? Nowhere, so it never has anything other than its default value, i.e. it is always zero. You need to provide the variable with an appropriate initial value and then presumably increment it each iteration. You also need to loop while the variable is in an acceptable range, i.e. less than the first value outside that range.
 
Back
Top