+ 5

Use proper code formatting for quiz submissions

When writing quiz questions that include code snippets, please include proper formatting, like spaces. For example, in C++: while (x-->1){ y++; } is the same as: while (x-- > 1) { y++; } For beginners and anyone who struggles under the pressure of timed questions, the first example can be confusing. I'm sure most people know that --> doesn't exist as a comparator, but it does exist with the "this" part of pointers and references, which can be initially confusing when not properly formatted as shown.

16th Mar 2017, 3:03 PM
Daniel Davis
Daniel Davis - avatar
2 Respuestas
+ 1
in my opinion... for quiz with beginner participant, it is important to make format properly even for parenthesis, bracket, quotation symbol, and don't forget indentation. :) why... to make easier reading the code for them. cmiiw
17th Mar 2017, 4:16 AM
Andrei Ramani
Andrei Ramani - avatar
+ 1
I agree that especially for beginners it's important to follow a style guide. It's easier to read the code when it's properly formatted.
19th Mar 2017, 8:47 AM
Jim Tryon
Jim Tryon - avatar