225k views
2 votes
Complete the code to move the ball to the left.

ballPosition = _ (0, 0, 0)
myBall = sphere(= ballPosition, color = color.green)

for n in range(10) : _ (1) # number of loops per second
myBall.pos.x = myBall.pos.x - 1

User Krivvenz
by
7.0k points

1 Answer

4 votes

Step-by-step explanation:

ballPosition = vector(0, 0, 0)

myBall = sphere(pos=ballPosition, color=color.green)

for n in range(10):

rate(1) # number of loops per second

myBall.pos.x = myBall.pos.x - 1

User Umesh Kumar
by
6.7k points