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

Your code output will appear here

Visible tests
1
Input
12
ExpectedTrue
2
Input
17
ExpectedFalse
3
Input
19
ExpectedTrue
4
Input
20
ExpectedTrue
5
Input
8
ExpectedTrue
6
Input
5
ExpectedFalse
Focus radio
Paused · SomaFM · Fluid