Close to a Marker

Programs often need to check whether a number is close to an important marker, such as 100 or 200. Write a function near_hundred that takes a number n. Return True if it is no more than 10 away from either 100 or 200, otherwise return False.

Примеры

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

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

def near_hundred(n: int) -> bool:

Теги

math
PostgreSQLv16

Tady se objeví výsledek běhu kódu

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