Saying sprite.y not working

We keep getting an error that it does not recognize the sprite.y or velocity.y. We are changing the sprite name correctly. Before student tried to do loop she said it worked. I am missing the error. Thank you.

You are calling the draw function in line 4, this in turn tries to reference corgi but you do not create the corgi sprite until after line 4.

You do not have to call the draw function, game lab does that for you. Delete line 4 and everything works.
Happy coding.

Thank you!! I have several students making the same mistake. This really helps.