Yes indeed, very solid point here
the second bit is more formal, " You're six years old, aren't you?"
because, the other sounds very demanding or imperative, like as if you have to answer the question. so, it has to be the second line.
I belive it is True because the Hammurabi Code has a harsh laws but just to make the people scared in way for the people to not make the same mistake
They can't pass the exam unless they "study" hard.