Programming Challenges

cdog5000

Banned
Messages
5
Today my website announced its new add-on: Challenges. The point of the add-on is to take the common Programmer and test his skills using an online Web-based Programming test. You can test your skills in a variety of different languages and different skills of Programming.

Not a Programmer?
We have tests and Quizzes you can also take!

Link: Challenges | Programming and Web Development Help & Forums or Click here!

Thanks :)

This is not meant to be a advertising post, more or less a post to teach beginner programmers.
 
This is not meant to be a advertising post, more or less a post to teach beginner programmers.
Sorry, I don't really buy that. Both of the posts you've made thus far (and your signature) have been advertising your site.

Besides which, I've tried at least one of the challenges on your site which is badly worded / just plain wrong:

Given 2 ints, a and b, return true if one of them is 10 or if their sum is 10.
Technically speaking, "return true;" would be a valid solution to that problem. I'm still returning true in all the cases you specified, and you gave no requirement as to what the program should do if those conditions aren't met.

There's also the question of ambiguity between whether "one" of them is 10, do you mean one or the other (XOR) or do you mean one and only one is 10?

Assuming you mean OR and not XOR, then a perfectly valid solution to the problem would be:

Code:
return a==10||b==10||a+b==10;

...which fails. The expected output dialog is also wrong:

Expected This run
1 true OK

Err... you might want to distinguish between 1 and true.

I'd actually recommend beginners stay away from these for a while. They look more confusing than helpful, at least in their present state.
 
Sorry, I don't really buy that. Both of the posts you've made thus far (and your signature) have been advertising your site.

Besides which, I've tried at least one of the challenges on your site which is badly worded / just plain wrong:


Technically speaking, "return true;" would be a valid solution to that problem. I'm still returning true in all the cases you specified, and you gave no requirement as to what the program should do if those conditions aren't met.

There's also the question of ambiguity between whether "one" of them is 10, do you mean one or the other (XOR) or do you mean one and only one is 10?

Assuming you mean OR and not XOR, then a perfectly valid solution to the problem would be:

Code:
return a==10||b==10||a+b==10;

...which fails. The expected output dialog is also wrong:

Expected This run
1 true OK

Err... you might want to distinguish between 1 and true.

I'd actually recommend beginners stay away from these for a while. They look more confusing than helpful, at least in their present state.
The output was a programming error, my fault. Its hard not to make mistakes when Copy/Pasting PHP Class's.
 
The output was a programming error, my fault. Its hard not to make mistakes when Copy/Pasting PHP Class's.
That's pretty much the textbook way not to code...
 
Back
Top Bottom