Updated code snippets for square and cube calculations