csev / cc4e

C Programming for Everybody
https://www.cc4e.com/
Other
260 stars 90 forks source link

Clarification on Exercise RS-8 #87

Open rui-teixeira opened 4 months ago

rui-teixeira commented 4 months ago

While working through the CC4E online C programming course, I encountered a challenge with the exercise RS-8 , specifically related to understanding the pre-validation error messages.

The message "NOT GRADED: You need to read the input." was displayed. I was using gets() to read the input as I had adapted my code from exercise RS-7.

This led to some confusion because RS-7 was quite similar and explicitly requires the use of gets() and the lecture notes and problem statement did not specify the use of scanf() for RS-8.

I found the validation code on:

# cc4e/tools/ccauto/rs-08-guess.php
# line: 81
function ccauto_require($LAUNCH) { 
    return array(
        array('scanf', 'You need to read the input.'),
        array('while', 'You need to read the input until the user gets the correct guess.'),
        array('else if', 'This application is best solved using a multi-way if statement (i.e. else if).'),
    );
}

I propose updating the pre-validation message to be more explicit in this case. For example, changing the message to "You need to read the input. (Use scanf)".

I am willing to contribute to this improvement by creating a pull request with the suggested change to the pre-validation message.

Thank you for considering this suggestion. I look forward to any feedback or thoughts on this proposal.