0
Why my code has syntax errors plz correct it
2 Answers
+ 3
1. You don't multiply functions by just adding numbers in front of them like this: 2sin(x)
Use the * operator: 3*cos(x)
You forgot it three times in line 6
2. You forgot two closing parenthesis at the end of line 6
3. You can't use cos and sin just by importing math, there are two ways:
1: you import math, and then use math.cos(x) instead of just cos(x)
2: from math import cos, sin
And then you can use them just like in your code, without math.cos or math.sin
0
Thanks brođ