Close to Ten

This kind of logic is useful when you need to know whether a number is close to a clean round marker. Write a function near_ten that takes a non-negative number num. Return True if the number is no more than 2 away from the nearest multiple of 10. Otherwise, return False.

Примеры

Ввод
12
Вывод
True
Ввод
17
Вывод
False
Ввод
19
Вывод
True

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

def near_ten(num: int) -> bool:

Теги

math
PostgreSQLv16

Čia bus kodo vykdymo rezultatas

Tests12
Visible tests
Paslėptas testas 7
Paslėptas testas 8
Paslėptas testas 9
Paslėptas testas 10
Paslėptas testas 11
Paslėptas testas 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