Open deladan opened 5 years ago
And again one thing that looks suspicious (but not every time) to Taskgrader: to use arrow notation as in scanf("%d", &d->year)
Link to the thread: https://courses.edx.org/courses/course-v1:Dartmouth_IMTx+DART.IMT.C.05+2T2018/discussion/forum/b47fc52b5cd268326cdf6007ec5711373b1ae756/threads/5bf348674fc23009d1000fab
Just some remark.
Some learner got the following warning:
Suspicious scan statements below
example of expected syntax: scanf("%d\n", &example);
line 7 : scanf("%d" "%lf", ¤t, &growth);
I don't question it, but I'm wondering about the '\n' which is present in the expected syntax.
I'd think that we should avoid using this in scanf statement.
Link to the activity (I don't know if it is helpful): https://courses.edx.org/courses/course-v1:Dartmouth_IMTx+DART.IMT.C.01+1T2018/courseware/ccb75017dce84804a4477600cf09014d/4d36544879324cb9b58ac26bb9f9ff7e/?child=first
Another "suspicious" warning, on the activity about if statements, Tug of War (course 2):
if(i%2 == 0)
seems to bother Taskgrader.
Link to the activity: https://courses.edx.org/courses/course-v1:Dartmouth_IMTx+DART.IMT.C.02+1T2018/courseware/a86febae1149479d971ae6edbd850c51/dd6988baae994fff80bd8bd9c1884cf4/5?activate_block_id=block-v1%3ADartmouth_IMTx%2BDART.IMT.C.02%2B1T2018%2Btype%40discussion%2Bblock%40ea1d9b78328042169dfef7e52f25434f
In course 4, now.
if((*(ptr+i))>max) raises a warning from Taskgrader.
Link to the thread: https://courses.edx.org/courses/course-v1:Dartmouth_IMTx+DART.IMT.C.04+1T2018/discussion/forum/a082f8ad62848408c7e6c5a183c978214c2ba846/threads/5c34079758adcb09860007b7
Another warning in course 5 with arrow notation:
Suspicious scan statements below:
line 29 : scanf("%d", &d->year);
line 30 : scanf("%d", &d->month);
line 31 : scanf("%d", &d->day);
Examples of expected syntax:
scanf("%d", &integerNum);
scanf("%lf", &decimalNum);
scanf("%s", string);
Taskgrader seems to be bothered if we try to split a long printf statement, as in this code:
include
int main(void){ int x = 25 - 23; int y = 60 24 x; int z = 60 * y; printf("Dear Procrastinator,\n" \ "You still have to wait for %d days (%d minutes or %d seconds) " \ "before you can procrastinate!", x, y, z); return 0; } Link to the activity: https://courses.edx.org/courses/course-v1:Dartmouth_IMTx+DART.IMT.C.01+1T2018/courseware/ccf660cc6a1141e0a9bebfc515ce320a/8886730e8869426bbdcab50815cbeedf/4?activate_block_id=block-v1%3ADartmouth_IMTx%2BDART.IMT.C.01%2B1T2018%2Btype%40discussion%2Bblock%40448236f24ba64b4aa314ae93827ab3bd
Another suspicious printf statement:
printf("%dx%d = %d\n", i,table,(i*table));
Here, the parenthesis around (i*table) seem to bother Taskgrader.Link to the activity: https://courses.edx.org/courses/course-v1:Dartmouth_IMTx+DART.IMT.C.01+1T2018/courseware/ccf660cc6a1141e0a9bebfc515ce320a/45513fa0b0c54101aee6dd481ef09257/3?activate_block_id=block-v1%3ADartmouth_IMTx%2BDART.IMT.C.01%2B1T2018%2Btype%40discussion%2Bblock%404dde839d3b64436c812f456c5f5b98f2
By the way, in these two cases, code is accepted by Taskgrader which is just giving us a warning.