Is Ninja Hattori a cartoon or anime?
It's Anime because it's made in Japan, and (generally) made for Japanese people.

Cartoons are animations in a broader sense, and as such, Anime is a form of Cartoon.
Made in Japan.

http://myanimelist.net/anime/4936/Ninja_Hattori-kun

It lies in the rating of the show and its targeted audience to determine what can be shown to viewers, low violence doesn't make something a Cartoon if that's what you mean.