Answer:
part a.

part b.
I =

Step-by-step explanation:
Part a.
For the center of mass the moment of inertia is:

Using the parallel axis theorem, we get:

I =

Additionally,
d = L/2
so:


part b.
For the center of mass the moment of inertia is:

Using the parallel axis theorem, we get:

I =

Adittionally, in this case:
d =

so:


I =
