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
Inicia sesión para ver tu historial de envíos
Iniciar sesiónInicia sesión para usar el AI Mentor
Iniciar sesiónVisible tests
1
Input
93Expected
True2
Input
90Expected
True3
Input
89Expected
False4
Input
195Expected
True5
Input
211Expected
False6
Input
1Expected
FalseFocus radio
Paused · SomaFM · Fluid