Kenya, Teaching

The Ultimate Question

I have been teaching two classes to students this semester: Introduction to Programming and Algorithms and Network Essentials. So I’ve spent the past eight or nine weeks lecturing, giving assignments, and issuing CATs. I just gave the third CAT to my programming students and I thought it was pretty fair, but I was surprised at the results. Every student got this question completely wrong:

int main()
{
int salary = 15000;

if( salary > 15000 )
{
cout << "You have a nice job!" << endl; } else { cout << "You need a new job!" << endl; } }

Asked what this small program would print when executed, they all answered “3.” I wrote this question to test understanding of two concepts: the conditional if/else structure and the “>” operator. I figured that even if the students didn’t understand the programming syntax, logic alone would guide them. After all, “greater-than” is a concept in plenty of other disciplines besides computer science.

It’s not like I haven’t been teaching them! We have definitely talked about both of these concepts in class, and I even had them try similar examples in the computer lab over the course of the semester.

Maybe it’s not supposed to make sense, like the people who built a machine to calculate the purpose of life, the universe, and everything in Douglas Adams’ The Hitchhiker’s Guide To The Galaxy; the machine spent millions of years calculating, only to spit out “42.” Maybe “3” is the right answer and I’m just not asking the right question, haha.

4 Comments to “The Ultimate Question”

  1. Erdost

    Alan, now I am really curious how they got their answer 3! I would like to hear some explication about it. Either they know something we don’t or someone came with the answer 3 and others just cheated :)

Comments are closed.