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
Prijavi se da vidiš povijest predaja
PrijavaPrijavi se da koristiš AI mentora
PrijavaTests12
Visible tests
Skriveni test 7
Skriveni test 8
Skriveni test 9
Skriveni test 10
Skriveni test 11
Skriveni 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