Hi, it is mainly about the print brackets for python3.
Also, as many examples do not show the actual plot, I recommend to use
import matplotlib.pyplot as plt
at the beginning and put aplt.show()
at the end.
Otherwise, it is hard for newbies to know what is going on.