Near a Round Marker

Round markers are often used as boundaries, such as checking whether a value is close to 100 or 200. Write a function near_hundred that takes an integer n. Return True if it differs from 100 or 200 by no more than 10; otherwise, return False.

Примеры

Ввод
93
Вывод
True
Ввод
90
Вывод
True
Ввод
89
Вывод
False

Нужно реализовать

def near_hundred(n: int) -> bool:

Теги

math
PostgreSQLv16

Siia ilmub koodi käivituse tulemus

Visible tests
1
Input
93
ExpectedTrue
2
Input
90
ExpectedTrue
3
Input
89
ExpectedFalse
4
Input
195
ExpectedTrue
5
Input
211
ExpectedFalse
6
Input
1
ExpectedFalse
Focus radio
Paused · SomaFM · Fluid