Skip to content

Is it in range?

Is it in range?

Read a whole number n with int(input()) (for example 14). Print yes when n is both more than 10 and less than 20. Print no otherwise.

and needs both sides to be true. Write each side as a complete question: n > 10 and n < 20, not n > 10 and < 20. (Python also accepts the chained form 10 < n < 20.)

Log in or create account

IGCSE, A-Level & AP