1
AssignmentMultiple Choice

Visual Python

Question 1 • SC-Fundamentals of Computing - Content Recovery - Design & Development

Which line of code moves the ball up?

Answer
A
myBall.pos.z = myBall.pos.z + 2
B
myBall.pos.x = myBall.pos.x + 1
C
myBall.pos.y = myBall.pos.y + 2
D
myBall.pos = myBall.pos + 1

Explanation

The y-coordinate represents vertical position, so increasing it moves the ball upward. Choice C adds 2 to myBall.pos.y; changing x moves it sideways, while changing z moves it along the depth axis.

AI-written and checked against the verified answer.

Next