Error when following a tutorial

This is the complete code: