Emily Moll
Emily Moll

Reputation: 3

Invalid syntax python (defining vectors)

#define the balls velocity
ball1.velocity=vector(85*cos(pi/9),85*sin(pi/69,0)
ball2.velocity=vector(85*cos((2*pi)/9),85*sin((2*pi)/9),0)
ball3.velocity=vector(85*cos((4*pi)/9),85*sin((4*pi)/9),0)

It is saying that there is invalid syntax for "ball.2". This has worked in previous programs and works for the other two balls. Any idea what could be causing this?

Upvotes: 0

Views: 231

Answers (1)

sth
sth

Reputation: 229754

You are missing a closing parenthesis in the ball1 line.

Upvotes: 2

Related Questions