We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Ok, this took me the better part of an hour to figure out what they are asking in this question. Basically, the idea is you are given two numbers 'a' and 'b' such that a<=b. You then need to test every number from a to b and output either the text version of the variable (if number <=9) or whether the value is even or odd (if number > 9).
So basically when the inputs are 8,11 you need to test every integer from 8 to 11, so you need to test 8,9,10,& 11. This leads to the output specified in the "Sample Output" of "eight, nine, even, odd". Hopefully this helps someone out.
For Loop
You are viewing a single comment's thread. Return to all comments →
Ok, this took me the better part of an hour to figure out what they are asking in this question. Basically, the idea is you are given two numbers 'a' and 'b' such that a<=b. You then need to test every number from a to b and output either the text version of the variable (if number <=9) or whether the value is even or odd (if number > 9).
So basically when the inputs are 8,11 you need to test every integer from 8 to 11, so you need to test 8,9,10,& 11. This leads to the output specified in the "Sample Output" of "eight, nine, even, odd". Hopefully this helps someone out.