Why is my code invalid?

Follow