Is question #4 correct? The For Teachers Only example makes it a little confusing.
The answer is correct. Functions cannot make calls to other functions in the same program. However, I do agree that the last sentence in the explanation is confusing. I will ask for clarity.
Update: A better explanation is coming.
Hi the answer is correct. The explanation could certainly be more clear. I’ve changed it to the following (though it won’t go live until after CS Ed Week).
Hope this helps.
---- New teacher explanation ----
This is a tricky question because the correct answer effectively makes a double-negative. It is NOT true that functions CANNOT call other functions. In other words: functions can call other functions.
Students should be very familiar with this fact after completing this unit since writing and calling functions from other functions is basically the primary focus.
This answer refers to the fact that in defining a function you can call other functions that you have written.
For example:
function drawFlower(){
drawpetal();
drawpetal();
drawpetal();
drawpetal();
}
Assuming that drawpetal()
is some other function you wrote (and does something) this is an example of one function calling another.