def near_thousand (n): return(abs(1000-n)<=100) or (abs(2000-n)<=100) print(near_thousand(1000)) print(near_thousand(800)) print(near_thousand(900)) print(near_thousand(2000)) print(near_thousand(1900))
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more