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
Prihláste sa, aby ste videli históriu odoslaní
Prihlásiť saPrihláste sa, aby ste mohli používať AI mentora
Prihlásiť saVisible tests
1
Input
93Expected
True2
Input
90Expected
True3
Input
89Expected
False4
Input
195Expected
True5
Input
211Expected
False6
Input
1Expected
FalseFocus radio
Paused · SomaFM · Fluid