Both the Code of Hammurabi and The US Constitution had laws that the people had to follow, some people might've been against it but either way they had to follow all the laws. The Code of Hammurabi had more laws then The Constitution and the punishments were worse.