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

Tukaj bo rezultat izvajanja kode

Tests12
Visible tests
Skriti test 7
Skriti test 8
Skriti test 9
Skriti test 10
Skriti test 11
Skriti test 12

They run when you press "Submit" — your whole solution is checked against them so you can't hard-code answers for the visible cases.

Focus radio
Paused · SomaFM · Fluid