The print invalid sync error keeps popping up.

Asked 2 years ago, Updated 2 years ago, 15 views

//defg(x):
    return (3 * x**2)/(2 * x)

Sum = 0

for j in range(599):
    Sum += g((monte_carlo(new_list)[j])

print(Sum)

If you run the above code,

File "<ipython-input-66-1237307b64d3>", line 9
    print(Sum)
        ^
SyntaxError: invalid syntax

I don't know the reason why it's floating...

It's running on Jupiter laptop, but just in case, in another box

x = 2
print(x)

If you do it, it will work. But it says print invalid syntax only from the top.

I don't know why not.

Help me, masters.

python

2022-09-22 12:43

1 Answers

Sum += g((monte_carlo(new_list)[j])

Missing one closing parenthesis in .


2022-09-22 12:43

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.