Help me with W1A3, There is something wrong with the given code!

Exactly. There is no guarantee any of the assignments will work in a different environment. You need to both copy all the files associated with the assignment and ensure that you have exactly the same versions of all relevant packages installed. There are no official instructions for how to do the latter, but the former is covered on the DLS FAQ Thread.