Basically, a crime is a violation of a state or federal law. The punishment depends on the nature of the…