Book of Deuteronomy have given various answers to the problem. The Deuteronomistic history theory is currently the most popular (Deuteronomy was originally just the law code and covenant, written to cement the religious reforms of Josiah, and later expanded to stand as the introduction to the full history); but there is an older theory which sees Deuteronomy as belonging to Numbers, and Joshua as a sort of supplement to it. This idea still has supporters, but the mainstream understanding is that Deuteronomy, after becoming the introduction to the history, was later detached from it and included with Genesis-Exodus-Leviticus-Numbers because it already had Moses
The Bible and violence for a snare in the midst of thee. But ye shall break down their altars, and dash in pieces their pillars, and ye shall cut down their Asherim" (Exodus 34). The Book of Leviticus sets out detailed rules for animal sacrifice. The Holiness code, Leviticus 17-26, sets out a list of prohibitions, and the punishments for breaking them. Punishments include execution, sometimes by stoning or burning. God orders Moses to count "all that are able to go forth to war in Israel" (Numbers 1). God hears the people "speaking evil" and punishes them with fire. Moses prays, and the fire