One of my students on his 3.10 Practice PT made a function with some turtle commands in it and wrote about how it managed complexity.
(1) If the function is actually only called once in the program is it still an abstraction?
(2) If it is still an abstraction, does it meet the criteria of managing complexity?
Yes, it is still an abstraction. From the AP exam perspective (which has been very lenient) if the student can explain how it reduces the amount of code and can be called multiple times in different areas, it will explain that it helps in managing complexity.
What if the function was not called multiple times? I was thinking it would be neither. Then, I read that Abstraction means procedure (for Create PT AP CSP purposes). So, I thought, surely at least not for Row 8 because it doesn’t actually manage complexity.
Like I said college board was pretty lenient last two years and gave points for saying that it helped reduce the number of lines of code. Did the student say in the write up that the abstraction could be used at different places? I would not give the point if the student does not mention it in the write up. I think we need to set the bar high even if college board decides to be lenient.
I agree with you @bhatnagars. I did not give the point if the student didn’t specifically explain how it “Manged the complexity” of the program. In other words, he/she needed to say it COULD BE used multiple times through out the program, etc.