QUESTION IMAGE
Question
question: 1
the following code contains an error. what line is it on?
1 function start() (
2 move();
3 move();
4 turnright();
5 putball();
6 move();
7 )
8
9 function turnright() (
10 turnleft();
11 turnleft();
12 turnleft();
13 )
line 3
line 4
line 5
line 9
Step1: Check function definition order
In programming, functions should be defined before they are called. The turnRight() function is called on line 4 but defined on line 9. This is an error.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
line 4