Syntax error (starter, very basic code)

Hi, I am an absolute beginner and trying to write a simple program to calculate the average of 5 numbers.
This is what I have come up with

a, b, c, d, e = map(int, input(“Enter 5 numbers separated by space:”).split())
average = (a + b + c + d + e)/5
print ‘The average of the numbers is’, average

However, I keep getting a syntax error. Can anyone point me in the right direction?

Likely it is your print statement. You have:

print 'The average of the numbers is', average

In modern Python print() is a function, and you need to write it like

print('The average of the numbers is', average)

If the example code you are working with is old you may have to adjust
all print statements into print() function calls.

Cameron Simpson

Thanks! It was a double problem, I needed to update to a later version of python AND adjust the print command :wink: