← Back to If Statements
Question 246
Inside Either Range
Inside Either Range
Read a whole number and print Inside when it lies in either of two bands, 1 to 5 or 10 to 15 (both inclusive), and Outside otherwise. Write each band as a chained comparison such as 1 <= num <= 5 and join the two with or. Input: one integer, no prompt. Output: one word.
Expected Output:
Inside= newline. The output ends with a newline — print one after the last line.
Hints3 available
Sign in to use hintsTopics:
If StatementsOperators
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.