Ad
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Clever!
    How did you think about it heheheheh!

  • Custom User Avatar

    where did you seen average value as integer? Why that is consider as best practice?

  • Custom User Avatar

    I think you do make a good point. What you say makes sense. However, in looking at the test cases, it appears that 'your_points' are not included in the 'test_scores' and that 'class_size' matches the number of provided 'test_scores'. So, mathamatically, to get the most accurate result, you would have to add 'your_points' to the array of 'test_scores' and then increase 'class_size' by one. However, doing this will not change the outcome of the final comparison of class average to 'your_points'. Adding you score will bring the class average closer to your score, but cannot cause the average to move above or below your score.

  • Custom User Avatar

    Shouldn't you include your_points in the average? The note in the description explicitly says your_points is not included. class_size is length of class_points, so it's also off by one (since you are also in this class). I think right now, you're checking whether you're better than the average student excluding yourself. If that's correct, then the note is somewhat confusing. Or am I missing something?

  • Custom User Avatar

    For people that look at this and wonder: I can't understand this. That is because this is not the best practice. The code has multiple declarations, statements and assignments on the same line. The loop however is fine.

  • Custom User Avatar

    I tried again too, and it works indeed... First time, I didn't remeber that in C cast was implicit in an operation like that, maybe the parentheses I've add (somthing like (int)'f'), or a typo I didn't saw. Anyway, that's my bad, sorry!

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    That's what I tryed first but he told me that I was using a forbiden caracter!? Did they revoke the modulo char? If that's it, they should put it in the forbiden caracters list...