Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

please answer the following question select many identify all of the fo…

Question

please answer the following question
select many
identify all of the following that use correct function call syntax.
select all choices that best answers the prompt above:
answer 1
turnright;
answer 2
countsheep(15);
answer 3
moveforward 3;
answer 4
climbtree();

Explanation:

Step1: Analyze Answer 1

Function call needs parentheses. turnRight; is just a reference, not a call.

Step2: Analyze Answer 2

countSheep(15); has function name followed by parentheses with an argument inside, correct syntax.

Step3: Analyze Answer 3

moveForward 3; is incorrect. There should be parentheses around the argument in a function call.

Step4: Analyze Answer 4

climbTree(); has function name with empty parentheses (if no arguments), correct syntax.

Answer:

B. countSheep(15);, D. climbTree();