How Should Schools Grade Unexpected-But-Correct Answers On Coding Tests? 177
There can be more than one correct answer for academic tests of programming ability, writes long-time Slashdot reader theodp:
Take the first of the Free-Response Questions in this year's AP CS A exam, which asked 70,000 college-bound students to "Write the static method numberOfLeapYears, which returns the number of leap years between year1 and year2." The correct answer, according to the CollegeBoard's 2019 Scoring Guidelines, entails iterating over the range of years and invoking a provided helper method called isLeapYear for each year.
Which does work, of course, but what if a student instead took an Excel-like approach to the same problem that consists of a (hopefully correct!) single formula with no iteration or isLeapYear helper function? Would that be a worse — or better -- example of computational thinking than the endorsed AP CS A Java-based solution? (Here's a 7-minute AP Conference discussion of how to correctly grade this problem)?
So, how have you seen schools and companies deal with unexpected-but-correct approaches to coding test questions?
Which does work, of course, but what if a student instead took an Excel-like approach to the same problem that consists of a (hopefully correct!) single formula with no iteration or isLeapYear helper function? Would that be a worse — or better -- example of computational thinking than the endorsed AP CS A Java-based solution? (Here's a 7-minute AP Conference discussion of how to correctly grade this problem)?
So, how have you seen schools and companies deal with unexpected-but-correct approaches to coding test questions?
From Star Trek: "You're not One with the Body" (Score:5, Funny)
So the correct answer is: fail them, and teach them the egregious errors of their ways so that soon they too can enjoy the wonders of mindless group thinking.
After all, you'll soon be noticed if you stick up like a nail.
Re:From Star Trek: "You're not One with the Body" (Score:5, Insightful)
Failing is the incorrect way to do it. The correct way is to approve the solution since it's the goal that's important and not the specific way that the problem was solved.
What school shall be for is to learn how to solve a problem, not to be a robot.
Leap years are relatively easy to calculate too, at least if you keep to one calendar and not have to take the transition between Julian and Gregorian calendar into account.
Re:From Star Trek: "You're not One with the Body" (Score:5, Insightful)
Failing is the incorrect way to do it. The correct way is to approve the solution since it's the goal that's important and not the specific way that the problem was solved.
A programmer should provide something that fulfills the specification. If the examiners want the program written in a particular way then their specification should make that clear. So if the student provides an unexpected solution the fail should be awarded to the examiners.
Re:From Star Trek: "You're not One with the Body" (Score:5, Insightful)
Requirements shall declare the expected result and not the path to the result. I.e. what you want, not how. In the requirement you may require performance constraints.
Re:From Star Trek: "You're not One with the Body" (Score:4, Informative)
Re:From Star Trek: "You're not One with the Body" (Score:5, Interesting)
But because I was not doing the way the teacher wanted me to, I got marked down.
This is how the CS AP test works. If you use some fancy-pants approach, you WILL BE MARKED DOWN if the grader doesn't understand it.
So students should be taught to not overthink, and to write the "expected" solution in a simple and straightforward way.
Of course said contractor better be able to show that their way meets the the requirements
The test-taker has no opportunity to "explain" their cleverness. They just turn in the paper copy of the program, and the grader anonymously grades it. There is no other communication between the test-taker and the grader other than what is written on the paper. No side-channel explanation, no appeal, nothing.
The purpose of the free-response portion of the test is to show that you can write code, not to show that you are clever.
Exam, not a job (Score:5, Insightful)
Requirements shall declare the expected result and not the path to the result.
That's not the case in an exam where the goal is to test knowledge. In basic mechanics, there are often two paths to solving a simple mechanical system: use dynamics or use energy. Sometimes it can be hard to set up a question to force a student to take one path (or you might actually want them to use both paths and compare) so, because I want to test that they know how, I will say something like "using conservation of energy, find x". In such cases if they ignore that instruction and do it by a different method they get zero.
On the flip side if I do not have such instructions then students are free to solve questions by any valid means but, if they go off the beaten track, then they do need to carefully explain and justify what they are doing because, particularly in simple physics problems, you can sometimes derive the correct numerical answer by a completely invalid path where the numbers "just happen" to work out for that one situation.
Re:Exam, not a job (Score:5, Insightful)
Broadly speaking, yes, the point of an exam is to test the examinee's knowledge. However, that is a very vague and imprecise statement. In principle each exam item is meant to assess a specific piece of knowledge. For example, the example of finding leap years is likely intended to get students to demonstrate an ability to iterate using a for loop with a nested conditional. One could simply tell the examinee that this is the intention, but then you are essentially telling them how to answer the question, which reduces the validity of the assessment (to what extent is, of course, a matter of debate). At the end of the day, the exam writer needs to know if an examinee can actually recognize a situation which calls for iteration, and whether or not they actually code up a valid for loop.
On the other hand, if a student comes up with a valid though unexpected solution, the fault is with the writers of the exam item, and not the examinee. The correct course of action in such a case is probably to give the examinee credit for their correct answer, or to remove the exam item from the computation of scores for all examinees. Hopefully, the knowledge which the invalid exam item was meant to assess is tested elsewhere—one or two problematic exam items should not seriously threaten the overall validity of an exam which is made up of many questions.
Re: (Score:3)
The correct course of action in such a case is probably to give the examinee credit for their correct answer, or...
I would argue that this is the only correct course of action. If they solved the question that you asked in a manner consistent with the text of the question then they have to get the credit. Removing the item means that the time they spent on it is now wasted and, if they spent time on this at the expense of other parts of the exam, this would unfairly disadvantage them. Excluding a question should only be done when there is literally no alternative e.g. a question with no valid answer.
Re: (Score:3)
Both! If the examiners want you to use a loop to solve the problem, then create a problem that requires a loop. For example, count how many people in a group have a drivers license using the function hasDriversLicense.
If the problem can be solved without using the skill the examiner wanted to probe for, the examiner screwed up when designing the test. The solution is easy, learn from your mistakes and make a better question next year.
Re: (Score:3)
What happens 500 years from now when they add another leap day?
This presumes that checking if leapyear is something done in multiple contexts, which I'm sure is not explicitly stated in the problem description. If the *only* thing leap year matters in the codebase is this function, then the argument doesn't hold water.
There's also risk calculation. The chances that your application will be responsible for anything in 500 years are slim. Besides that, it is far more likely that something unforeseeable will break assumptions in the code before 500 years comes along, s
Re:From Star Trek: "You're not One with the Body" (Score:4, Insightful)
That's not, at all, how you start teaching programming! (The context here is an AP test.)
Programming should be an adventure of exploration and abstract beauty. Don't crush their dreams before they enter the workforce, that's just mean.
Re: (Score:2)
It is a programming test, not programming.
Re: From Star Trek: "You're not One with the Body (Score:2)
What's so spaghetti about his code?
Re:From Star Trek: "You're not One with the Body" (Score:5, Interesting)
Real life experience:
I had a nephew hit up against his first year of algebra. Luckily, I was an algebra tutor for kids his age and up.
I told him, "Tommy Wayne, put down the pencil and close the book and let me tell you how this stuff works. THEN we'll do the homework."
I talked him through the awkward newness of placeholders instead of actual numbers, and how equations are scales that must always balance, and off we went! I gave him some fun problems and we giggled and punched each other.
The kid (like me) was bright.
Two days later he was all upset. He'd gotten all the right answers and stuff, and he showed his work, but the teacher wanted the workflow to be HER style.
I told him, "Work it both ways. I want you to work it the way I taught you first, then I want you to work it her way. It'll be cool to have a double check to make sure you're correct, because that's the ultimate goal."
Kids his age rarely signed up for another semester of that crap, but he was like, "Bring it on!" He didn't have to show his work by then and I taught him some shortcuts.
He's in college and tested out on all of his math except for calculus, a discipline in which I suck.
Re: (Score:3)
I remember going thorugh that and now I get to see my daughter go through the same thing. Even worse as she's generally asked to show her work using multiple strategies for the same question and frequently none of the required strategies are what she likes.
Gave the same advice, solve it whichever way you want and then go back and show the work the ways the coursework demands. It's tedious but that's just how the world can be sometimes. It's also good practice for the real world, where frequently the same
Re: (Score:3)
There's approximately zero chance that someone learns algebra "the wrong way", is able to show the solutions to the problem in both "the wrong way" and the curriculum approved way, and somehow has such a flawed understanding that it impacts their understanding of calculus.
I'm guessing you aren't familiar with math teachers, but they aren't experts at math. The reason a teacher wants the homework and tests done in the curriculum style is because they don't understand it. They can only grade it if it looks li
Re: (Score:3)
+1. The teacher herself does not understand it.
As correct? (Score:4, Informative)
If you want to do a standardized test logical problem solving ability, then you don't get to quibble when they find holes in your logic.
maybe..maybe not (Score:3)
I actually just had this exact case come up for my sons pre-calculus final exam. He solved some of the problems asking for how many roots. He included the complex roots and they marked it wrong since they meant real roots and cosidered analytic continuation a subject for 2nd year calculus. He also got marked down for computing analytic derivatives rather than taking small diferences and dividing by a small delta.
Their concept was this-- they are trying to make sure you understand the process not memoriz
Re: (Score:3)
Re: (Score:3)
It's dishonest and unfair to to penalize someone in a game without first explaining the rules. Even small children understand this. But teachers often don't.
If it was clear from the instructions on the test that a specific method must be used, not just "get the right answer", then fair enough. But, as with most tests, the full instructions were along the line of "solve this" or "prove that", then it's dirty pool to mark off for method chosen.
Re: (Score:3)
To be fair, if a child is providing answers with complex numbers when others in his class don't even know what they are, it would be silly to say "and don't count complex numbers" in the question. Over-explaining rules that don't apply to the vast majority of students only adds confusion.
I agree it was handled badly, of course, sounds like he had a terrible teacher.
Re: (Score:2)
While I agree with the sentiment:
"In order to calculate this value, a helper method is provided for you.
isLeapYear(year) returns true if year is a leap year and false otherwise.
Complete method numberOfLeapYears below. You must use isLeapYear appropriately to
receive full credit."
In this case, the test is very clear and if you are clever enough to write the function without the helper, you are clever enough to know *exactly* what they are looking for and go with it.
There are two facets to this. Obvio
thumotic vs sclerotic (Score:2)
You can simply implement your isLeapYear using the Excel formula as function numLeapSemiOpen called as numLeapSemiOpen(year,year+1) and obtain the best of all worlds.
If isLeapYear isn't allowed to call out, then you assign begin=year, end=year+1 and fall through to the Excel formula inline.
Procedural if blocks have no business existing inside of a simple algebraic map. We've been hammering on the wrong conceptual model of contingency so hard for so long, many programmers now find the direct approach weird,
Re: (Score:2)
I probably got some sign wrong in the example code. That wasn't the point. I had bigger fish to fry. If that's where you stopped, read again.
Re: (Score:2)
Comment removed (Score:5, Insightful)
Re: (Score:2, Insightful)
This is a computer science test, answers should also be scored on things like code readability, maintainability etc. and not just a single score for any working answer.
Re: (Score:3)
Is it a computer science test or a software engineering test?
Score on those for the latter, not the former.
Java, not computer science (Score:4, Interesting)
Re: (Score:2)
Re: (Score:3)
Way back when I lost points on a test despite being the ONLY correct answer. Had to school the prof on why his solution (and most of the classes, at least all the ones that had an answer at all) was wrong. He was so petty that rather than give me full credit back, he went and found cosmetic quibbles to only give me about 75% credit despite being the only one in the class to get FM modulation after frequency multiplication right.
At the end of the year be put the A/B line right above me, despite a large gap
Old problem (Score:3)
It occurred several times during my college days.When possible, the key was to do it _both_ ways, the expected way taught by the class to that point as well as the more effective or more elegant solution.
Re: (Score:2)
The requirement says:
Does that mean you must use isLeapYear, or does it mean you must not use it inappropriately, or both? English is hard.
Re: (Score:2)
True, and I acknowledge that on a timed test you may not have time to do it both ways.
Re:Old problem (Score:5, Funny)
AP Grader (Score:5, Informative)
Classic problem in teaching (was:AP Grader) (Score:2)
Re:AP Grader (Score:4, Insightful)
Within the bounds of the question and good programming practice....
If I tell you to sort a list of numbers using a bucket sort and you do it using a bubble sort, I might give you partial credit depending on the point of the course. If you write something that is less efficient but still does the bucket sort, you are getting more credit. Also, I don't really care about syntax errors or things that the compiler will catch (unless that's the point of the question) so I'm not marking down students for missing semicolons or mismatching braces.
The point of the test is to verify the student knows the material well enough to answer the question asked. If you answer the question, using the specified technique, you get credit as long as I can figure out what you are doing. I do sometimes take off for egregious programming practice problems. If you are in a language that you have to manage memory and you don't, if you program something that leaks memory like a sieve, or if you go out of your way to program around not knowing how a 'while" loop works, then, depending on what the course is about, you might lose some points.
Re: (Score:2)
But how would you mark a "solution" that returned the correct answer but wasn't immediately obvious why it was correct? I don't know how the American system works, but I wouldn't accept it without justification, such as a proof of correctness.
Re: (Score:3)
If it is correct in a way that is not obvious to you, learn from it, and give full marks.
If it is not correct in some edge case, that's a fail. Dates in particular can be tricky. For example, in 1582, we switched from the Julian calendar to the Gregorian calendar. It affects leap year calculations.
Re: (Score:3, Informative)
Catholic countries switched to the Gregorian calendar in 1582. Most Protestant and Orthodox countries took longer to switch. England (and countries under English rule) didn't switch until 1752, and dates in the 170 year gap have to be specified as [NS] or [OS] to indicate if they're Gregorian (New Style) or Julian (Old Style). Russia didn't switch until after the Communists took over. Eastern Orthodox churches still use the Julian calendar for liturgical dates, which is why they celebrate Christmas late
Re: (Score:2)
Good point. Perhaps the difficulty of defining what to do for these edge cases is one of the things that led the College Board to leave isLeapYear as an undefined black box. Microsoft Excel hiccups on dates earlier than 1900 [wikipedia.org], so hopefully handling things back to 1582 still merits partial credit. :-)
Re: (Score:2)
With the sort of problem mentioned in the main post, you can do relatively exhaustive testing. Like all pairs of dates between 100CE and 6000CE. That should be reasonably fast.
There are a few correct answers, though, so you'd want a test harness adept enough to handle that. There's the proleptic Gregorian calendar, which would use the same leap year rule as we currently do. Or you could switch between the Julian and Gregorian at some point between 1582 (Catholic countries adopt the Gregorian calendar) and 1
It's not a correct solution though (Score:2)
The excel solution doesn't handle the years before the Gregorian calendar began, and the "leap years" in the problem might not even be the Gregorian leap years. Or perhaps it's a Gregorian leap-year with pre-Gregorian dates "filled in" for business purposes, perhaps it's grafted Julian leap-years on for the date range that would apply, or perhaps it's going to be used in a Mars calender where the leap year formula will necessarily have different coefficients (# sols / martian year is not the same ratio as d
Re: (Score:2)
Appropriately in some cases may mean not at all. For example, when tightening a screw, the appropriate use of a circular saw is not at all.
Unless calendry was a subject of the class, the examiners may NOT assume the students know there was a shift from Julian to Gregorian calendar resulting in a change in the leap year calculation.
OTOH, if the irregularity of leap year WAS discussed in class, then the student is properly responsible for knowing that and so answered the question incorrectly.
bad summary for the example (Score:5, Informative)
Re: (Score:3)
Re: (Score:3)
Re: bad summary for the example (Score:2)
Re:bad summary for the example (Score:4, Informative)
"MUST" and "SHALL" mean the same thing, according to RFC 2119.
Re: (Score:2)
That may be so, but they don't mean quite the same in English. And the mean slightly different things in British and US English. But I've got to admit that I have a difficulty in trying to put the difference into words. I tend to feel that "shall" is used in relation to future actions, and "must" is used when the emphasis is on coercion. (And then there's "shall have" versus "must have".)
Re: (Score:2)
The question provided to the student was:
"Complete method numberOfLeapYears below. You must use isLeapYear appropriately to receive full credit."
If this were the AP Calc exam the question said:
"Calculate integral below. You must use integration by tables (see tables provided) appropriately to receive full credit." and the student use purely integration by parts or inverse trigonometric forms (without get near any of the formulas on the provided table). Student getting the correct result of course. No one
Re: (Score:2)
So, if they had added a line
bool ignoreMe = isLeapYear(startingDate);
then they would have gotten full credit, but without it they get marked down?
Re: (Score:2)
Re: (Score:2)
No, the question says the function must be used appropriately. If the algebraic solution a 100 times more efficient than the for loop/fold in the worst case, it's actually inappropriate to use at all it it's on the critical path.
An appropriate use doesn't always exist.
Re: (Score:2)
No, it says you must use isLeapYear appropriately, and in my experience when an O(1) algebraic solution exists that can effectively replace an O(N) iterative solution, the appropriate use of the helper function is to not use it at all.
I know that's not what they meant, but if the proctors are going to hold us to every word, I'll hold them right back. They shouldn't have qualified the use of the function. They should have said, in no uncertain terms, that it must be used to receive credit.
If it elegantly solves the problem and is scalable (Score:2)
If you want them to demonstrate application of a specific approach to solve the problem, then mention that they are supposed to solve it using that method.
For example you could add: Use the methods we learned in class. As a general rule for answering questions. That doesn't give away the exact approach, which may make th
Re: (Score:2)
Hmm, is "non suboptimal" the same as "optimal"?
Re: (Score:2)
There can be solutions for problems that may work under some idealized conditions, but if you have restricted memory and computational power available it may not work that well and fail under those circumstances. Which makes the solution suboptimal.
Well, at least that is how I am using that.
Math, arts, history (Score:2)
The students should know the topics after years of "study".
The academic tests will rank the best to the average to the well below average.
The conscientious students with the correct IQ level will read the question and attempt to answer in the time given.
The person doing the test learned something over the days/weeks/months and can now show what they know.
Did not bother to study? Thats not the education systems problem.
Wont study? Who passed the failed student
Re: (Score:2)
The goal in education is to give pupils a 'score' based on their ability and willingness to follow instructions. It isn't a score for creative thinking, or even productiveness. It's a score for doing what you are told and completing assignments compliantly.
I don't do that well in such a setting. A lot of people here probably haven't because we are creative and find ways to route around authority whenever possible.
But academic scores matter a LOT to the HR fucks who gatekeep at big companies.
As a former teacher... (Score:3)
...I always tried to welcome creative solutions to the problems presented.
Unfortunately, the school system is not created as simple as that. Most teachers, including the principle, would expect you to correct the tests according to the facit at hand (expected answers, correct down to the smallest detail), not the actual result or outcome, which I find so sad. This is primarily why I stopped teaching, I couldn't handle the constant onslaught and endless explanation to my fellow teachers that the students problem solving was correct, and not incorrect even if it did not have the exact same code as in the expected correct code. Some of them where even shorter and smarter.
In my mind the school has to upgrade themselves, learn to respect creative individuals and recognize that there's more answer than just one.
If you can outcode or outperform the expected result, meaning - you get an equal or better result - then you should be commended for it, not punished!
Thankfully, the industry has far recognized this talent, and don't give a hoot about your test scores, but what you can do for the company.
Yes, mod parent up! (Score:3)
Basically this.
The problem is BURN OUT, grading answers is the most painful mental torture outside of modern US public school politics. New teachers may be OK but after they burn out from proper grading they will gravitate towards avoiding the suffering and some without oversight will go to multiple choice automated grading. Actually, technology encourages bad behaviors and does more harm in the end... it needs to be treated like an opiate... an occasional necessary evil. We also have generations of bad p
If that's your question, it's a bad test (Score:2)
The Question should state "Calculate the number of leap years from year X-Y by iterating over the range of years"
Then, any other method is incorrect.
Re: (Score:2)
The modulus operator used in the formulaic solution inherently iterates without actually having to iterate.
Wait for it...
It says to all the years, "Everyone who is a leap year, please step up." All the years heard it but only leap years stepped up.
Re: (Score:2)
In my defense, in SQL, BETWEEN 1999 and 2000 refers to 2 years. :-) I see what you're saying, but the AP CS exam model answer also counts the endpoints. Another case where ambiguity can lead to more than one possible "correct" answer?
This is nonsense (Score:4, Interesting)
If someone supplies a correct answer they should be credited accordingly. Your inability to foresee all possibly correct answers to a problem should not inhibit others. It's like asking someone to prove their work and grading their answer wrong when they didn't prove their work to your satisfaction. I can recall more than one conversation over the years like this:
Teacher: I marked it wrong because you didn't show your work.
Me: The answer is correct, I did my work in my head.
Teacher: How do I know you didn't cheat and copy the answer from someone else?
Me: Because I'm always the first person to turn my test in.
It shouldn't matter how someone comes up with an answer so long as they don't cheat. A correct answer is a correct answer and in the real world there is often more than one correct answer. Correct answers should always be credited.
People are always clamoring about how they want diversity in ideas, so why the hell would you mark down an answer that is correct just because someone had a different idea on how to achieve the desired result? This is the kind of real world skill that employers need in the workforce. In my experience the ability to present multiple correct answers to a problem with the benefits, drawbacks and a recommendation between to leadership is a critical career skill.
Re:This is nonsense (Score:5, Interesting)
If a test question says 'show your work' and you don't, no credit from me. I had an instructor in college who absolutely required that your work be shown and if you didn't show it, even the correct answer got zero points. But the whole POINT of the course was to teach how to derive the equations to solve various physics problems, so that's what the test was about. Getting the correct answer was nice, but if you didn't know how to get that answer, you didn't know the material.
This is all about what the teacher is trying to teach and what's being asked on the test.
However, I recommend that the "in my head" folks show their work, always, in sufficient detail to show how the answer was obtained. In the rare instance the answer is wrong, showing your work may get you partial credit and help your grades. Of course lazy teachers don't like this, they just look at the final answer and don't care about the rest.... Which is a shame.
Who cares? (Score:2)
The teachers we have won't recognize the answer as right anyway.
College Memory.... (Score:4, Interesting)
When I took a computer engineering exam while at college, the prof said 5 points off for a missed gate.
I did the minimization and checked the results. Then, I drew the diagram and turned in my exam thinking I had a 100.
Got the exam back and got a 5. I was stunned. I then went to see the prof who insisted My solution was entirely wrong and that is why he gave me a 5 out of 100. I said I missed just one gate in my diagram.
I then spent a hour with him, going over 256 possible inputs to demonstrate that all that was missing was a single inverter - which was clearly indicated on the calculations I had done.
After all 256 cases were tested, he regraded the exam as a 95...taking off just the 5 points for the missed gate.
He was a substitute prof for the course and was going off the answer key. He wasnâ(TM)t prepared for a better and truly minimal solution. But, he listened (albeit reluctantly) to me and gave me the correct score in the end.
In my case, the test question did not spell out how the student was to solve the problem. In an open ended CS coding problem, plugging the code into a test framework (like used in online coding interviews) would demonstrate if they solved the problem correctly.
So, I say make them implement the code to a particular interface as part of the exam and run it through a prepared test framework.
In my case, I had used a different minimization technique that utilized Quinn-McClusky instead of 8 input Karnaugh maps....they hadnâ(TM)t taught QM in our course.
Testability (Score:2)
Re: Testability (Score:2)
Formula (Score:2)
I'm not sure how that formula could possibly work as it doesn't refernce cell B2, the end year.
But number of leap years between 0 and the end year minus the number between 0 and the beginning year should work; they need to finish it.
Re: (Score:2)
The three lines do start with "=INT((B2-". Assuming you're referring to the second calculation in each line, which I should have commented on, it omits B2 because it's an adjustment to add 1 if A2 was respectively divisible by 4, 100, or 400 (probably a clearer way to do this, but it is what it is). And, in retrospect, I should have showed the formula within C2 instead of copying-and-pasting it into a note and marking it up - when I read this, my first thought was that I moved something around in the worksh
The one-line function does not work! (Score:2)
The one-line function 'Excel-like' does not work, at least in the sense that it uses the proleptic Gregorian calendar rather than calculating the leap years using the Julian calendar for those years before the changeover. (That is, it projects the Gregorian calendar backwards even during those years in which the Julian calendar was in use). There will be a similar proleptic error when we have to abandon the Gregorian calendar in a couple thousa
Re: The one-line function does not work! (Score:2)
As suggested 30 years ago ... (Score:2)
What are you testing? Mastery or future success? (Score:2)
There are at least two correct answers to this test--pass and fail. Which one is less-incorrect depends on context and other facts not-in-evidence.
In the past, testing was most often done to determine how much the student had learned and now knows. More recently testing (especially standardized) is done to predict some measure of subsequent success. These are very different goals. Back-testing might well indicate the unconventionally correct answer _should_ be marked wrong. (To the delight of mechanical
Article is mixing Question with Example, ugh (Score:3)
The AP exam is a certification style examination. It is entirely different from a test a student normally in school or college.
In school, test are (in theory) part of a learning experience. The testis NOT about learning, it solely about evaluation.
A major function of the AP exam is to determine if the student has the knowledge and understanding they would receive from taking the corresponding college course. Reading and understanding how to answer question is part of this.
For this example the each text of the question "Complete method numberOfLeapYears below. You must use isLeapYear appropriately to receive full credit."
It should be noted that how a leap year is defined or determined is absolutely absent from this question. What a leap year is for the purpose of this question is what the isLeapYear methods returns true for.
Understanding the abstraction and how to use it specifically what the question is intended to test for. Also the test is not taken in a vacuum. It is taken after having a school-year long course designed whose curriculum is specifically designed for the test and how it should be taken.
The understanding that using a formula without touching the provided and required helper function is not the 'right answer' is part of what is being tested.
The same as in English class (Score:2)
There are many ways to express ideas in english, and for a grade-nine student to demonstrate understanding of adjectives. A four-page poem demonstrated adjective-use far more than a four-page essay of prose.
English teachers have no problem grading that poem -- it's a very quick F or "incomplete".
It's "school", not "learning". It means "everyone together", not "understanding".
There are many ways to swim through the ocean. You can't be in a school, and also go your own way.
I don't see why it would be any d
See also... (Score:2)
How To Measure The Height Of A Building With A Barometer [esmerel.com]
"I'm sorry Mr. Gauss, you didn't use a For Loop" (Score:2)
The Story of Gauss [nctm.org]: "I love the story of Carl Friedrich Gaussâ"who, as an elementary student in the late 1700s, amazed his teacher with how quickly he found the sum of the integers from 1 to 100 to be 5,050. [...] This representation of the way Gauss solved the problem may help students explore the connection to the algebraic generalized form for finding the sum of a series of consecutive numbers: n(n + 1)/2."
This is just the barometer question (Score:2)
Urban legend [snopes.com] around since the '50s.
Interesting "out of the box" answers are generally celebrated, not punished. This is especially important in business as it can save a lot of money.
Reminds me of how the original apple disk drive was made.
I would say incorrect (Score:2)
It means the student chose to ignore the specifically given function that was stated to provide isLeapYear (which may have been rigorously tested to not fail any situation), in favor of a formula they've defined and provided no other justification for.
Is the definition of a leap year mod_4 - mod_100 + mod_400 precisely? There
Re: (Score:2)
even with the function, there are ways to optimize the number of comparisons needed. You don't need to compare each year, you only need compare every (lowerBoundary + ( 4 - lowerBoundary mod 4)) + 4 * n until it becomes equal to (upperBoundary - ( upperBoundary mod 4)), similar to this
c:=0
y:= (lowerBoundary + ( 4 - lowerBoundary mod 4))
h:= (upperBoundary - ( upperBoundary mod 4))
if y>h then error
while y = h {
if isLeapYear(y) then c++
y:=y+4
}
Re: (Score:2)
Obviously also check if the boundaries themselves are leap years which the above code will not do.
Unexpected?? (Score:2)
Re: (Score:2)
doesn't exactly count, but (Score:2)
Interviewer made some quip in email about not asking silly questions like "Write a kernel-quality scheduler in under 20 lines of code."
I came back immediately with:
Why is Java on the test? (Score:2)
Sorry, but expecting people to know Java to answer questions on a test that's supposed to be general is inherently flawed.
From Passing grade to Outstanding Achievement (Score:2)
The answer works, so in all cases it should get a passing grade, at least. If the complexity is equivalent to that of the expected answer, full mark. If it's better, bonus points (the teacher grading the test should also explain why in the first and last cases).
It cannot happen: (Score:2)
Challenge the marker (Score:3)
This happened to me when we actually studied Geometry in high school. I wrote a proof that was a line shorter than the standard proof and the marker tagged it wrong. I went to the teacher and asked why my proof was wrong and when it was actually read they had to agree that the proof was correct and changed my mark.
Challenge them to tell you why a thing is wrong when it produces the desired result in a more imaginative way. We need to understand but we cannot understand AND PROGRESS by sticking to wrote learning. We need original thinking as well.
With proper judgement (Score:3)
I've experienced this myself as a student, in both good and bad ways. One time I wrote what I thought was a "cool" self-modifying function that worked. I did not get full credit for that, and later I learned why self-modifying code was bad. OTOH, I once had a TA take off because I produced a solution to a problem that used a Mealy network rather than a Moore network. That TA said he expected me to use a cookie-cutter approach (that we hadn't even been taught!) and that it would produce a Moore network. I badly wanted to complain about this to the prof., but I decided not to make waves since I was getting an A in that course anyway. It still sticks in my craw though.
So. If the solution produces the correct output, properly handles exceptions, is readable, and runs as fast as the "standard" answer, the student should get full credit--regardless of how they get there, or what they got.
OTOH, they could have a solution that produces correct output but is excessively "cute", or slow, or somehow insecure. Partial credit, depending on how bad these problems are.
Don't straitjacket them, but don't let them wander in the woods either.
Define correct (Score:2)
But seriously, if the test makers are looking for demonstration of knowledge of certain coding/problem solving problems, they need to come up with better questions.
clearly state your conditions (Score:2)
If the question given was "provide the correct answer to this question" then anything that does needs to be given full points, because the taks, as stated, has been accomplished.
If you ask something like "apply the approach you learnt in class to solve the following problem ..." then only that approach counts, because you're essentially asking a memory question.
It really is very simple when you use a bit of logic, isn't it?
I know this is common, and I hate it, but people do need to stop asking open-ended qu
It depends on what they are teaching (Score:2)
Re: (Score:2)
Clever, but wrong. The goal is to return the count, not print a list.