In addition, I changed the variable to ensure the LED was on/off.
Instead of If the [distance is =10, Led turn on and else if the
distance >=10 & <20, Led turn off ], I change the variable to
[distance>=0&<10, Led turn on and else if the distance >=10, Led turn
off ], Finally I successfully compile two codes.