Invalid syntax error on Jupyter Notebook

Good morning, i am getting this error while running this code on Jupyter Notebook 6.1.4, i am using Python 3. I am a new comer in Python coding please help

You need parentheses around the argument to print, just like any other function

print("Epoch {0} complete".format(j))

(I’m guessing you copied this code from some old codebase or tutorial from back in the Python 2.x days?)

1 Like

Yes thank you, i was following a You tube tutorial

Old tutorials from Python 2 will not need parentheses when you call
print. Python 3 requires them.

1 Like

import network
net = network.Network([784, 30, 10])

I have hit another brick wall, i ran the above code and got the following error

ModuleNotFoundError Traceback (most recent call last)
in
----> 1 import network
2 net = network.Network([784, 30, 10])

ModuleNotFoundError: No module named ‘network’