Pet engineer, code doesn't work

Hi @Priyanka_Paul, welcome to the Discourse! :partying_face: This is a friendly place to chat and ask for help on CodeCombat levels (remember to format your code correctly). Before you continue, don’t forget to read the guidelines here if you haven’t already.
We hope you enjoy your time here! :tada:

(@)TheCodingCrusader22, the ‘don’t post unless’ message for solved topics does say that it’s ok to reply if the solution doesn’t work for someone

Priyanka_Paul, could you please format your code correctly so that we can help you?