A language has strict syntax. You have to follow the rules.
Here are some violations in your code:
- You have to match the opening parentheses with closing parentheses
- You have to match indentation level
- You have to put new instructions into new lines.
Your code fixed would look like this:
n = (float (input ("primeira nota:")))
n2 = (float (input ("segunda nota:")))
n3 = (float (input ("terceira nota:")))
n4 = (float (input ("quarta nota:")))
M = n + n2 + n3 * 3 + n4
M2 = M / 7
print ("Media do aluno", M2)