Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

question: 1 the following code contains an error. what line is it on? 1…

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

Explanation:

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.

Answer:

line 4