ok this was my attempt at the question:

Suppose G is a p-group

, where

Let g

Hence, every element of G has order a power of p.

Conversely, suppose that every element of G has order a power of p

But

divides

Hence, G is a p-group.

can someone look over this and tell me what mistakes i made if any please ?