I am trying to go through one of the Machine Learning Courses on Udacity. This came to an abrupt halt when the first example would not run. They seem to be asking me to basically copy-paste some code into a web-based source code file of some kind in python. TheProblem is I do exactly as they say and I get errors when I run it. I've attached a picture detailing how I copied exactly what I was instructed to copy and still don't achieve what the video-lecturer claims should happen. I also don't have a strong understanding of Python so i'm not sure what I'm doing wrong here. Any light anybody could shine on this would be helpful. Let me know if i'm not just going crazy here.. or whether I should give up on this broken example and switch to Coursera or something.

[![enter image description here](https://i.stack.imgur.com/Md8hZ.png)](https://i.stack.imgur.com/Md8hZ.png)