Se încarcă problema…
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.
12True17False19Truedef near_ten(num: int) -> bool:
Conectează-te pentru a vedea istoricul soluțiilor trimise
Conectează-teConectează-te pentru a folosi Mentorul AI
Conectează-teThey run when you press "Submit" — your whole solution is checked against them so you can't hard-code answers for the visible cases.