IT WORKS but with errors!

logical problem solving.