No, I don't care how many new variables you use and what language you use.
Yes, I had people not be able to complete this.
I would say this is something that is so basic that:
a) It's not testing any knowledge
b) It's basic enough that you can figure out under stress, while never seen it before
c) It's short, easy to explain (in 5 different ways if need be), and easy to validate
d) It's an idiot filter. It doesn't even test if you can program, it's more like "If you know how type out code, are you also capable of reasoning about the basic logic of that code".
Write a program to make
a == 9 && b == 7
No, I don't care how many new variables you use and what language you use.
Yes, I had people not be able to complete this. I would say this is something that is so basic that:
a) It's not testing any knowledge b) It's basic enough that you can figure out under stress, while never seen it before c) It's short, easy to explain (in 5 different ways if need be), and easy to validate d) It's an idiot filter. It doesn't even test if you can program, it's more like "If you know how type out code, are you also capable of reasoning about the basic logic of that code".