Time2Code Level 5 4. Random Name Generator #155
Replies: 4 comments 1 reply
-
|
@MattMcC-UK I had a look at my notes for this exercise, and it indeed reports an inconsistency between the description of the assignment (in my interpretation) and the sample solution. The sample solution is also used to compile the Parsons puzzle. In my interpretation of the assignment, only a single random name had to be generated. So the result should only consist of a single line (and no input needed to be provided). Hence the "EOF when reading a line", which is triggered when a submitted solution tries to read a line of input and there is none left (in this case no input was provided at all). However, the sample solution (and Parsons puzzle) of the assignment assume that the multiple names must be generated (one name for each ENTER) with the input being closed by a line containing "end". I have now aligned testing submitted solutions for this assignment according to this expected behaviour, which means that now solutions have to
Could you check if this is also how you (and your students) interpreted this assignment? If so, I'll update the description of this assignment to make it more clear what the expected behaviour should be. |
Beta Was this translation helpful? Give feedback.
-
|
@MattMcC-UK My notes for the "level 05: darts" exercise:
I'll have another look into how we automatically assess this assignment, to see if some of these issues can be alleviated. Did the updates for the automated assessment of the "level 05: random name generator" work for you? If yes, I'll finetune the description of the assignment to align it with how the assignment gets tested. |
Beta Was this translation helpful? Give feedback.
-
|
@MattMcC-UK After closer inspection on this assignment, I think the automated assessment has been setup correctly. However, I think Craig 'n' Dave's sample solution (which is also used for the Parsons puzzle) has a minor issue. Line 50 should read as elif score[player] - total <= 0 or score[player] - total == 1:which could even be simplified as elif score[player] - total <= 1:instead of its original form (with a strict less than compared to less than or equal) elif score[player] - total < 0 or score[player] - total == 1:The difference is subtle, but as the assignment states a player does not win if his throws reduce the score to zero but the last dart is not a double. See for example test case #15. in turn #9 the player starts with a score of 43 and throws a double 20 (40) followed by a 3. Since the 3 is not a double, the player gets busted after two throws and should not have a third throw in this turn (as is the case in the sample solution you provided). If you agree with this, I'll modify the Craig 'n' Dave's sample solution (and the Parsons puzzle) for this assignment. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @MattMcC-UK! We've put up a fix in addressing all issues. The description indeed had drifted from the sample solution, the Parsons puzzle, and the automated tests. Students who followed the prose wrote a single-name program, but the test harness feeds extra What's changing:
Should land on Dodona shortly! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
My students are having issues with this task. When they test the code, it always gives them errors. Even when we have entered the code from the completed parsons problem and made sure they match the code is always throwing up an EOFError EOF when reading a line File "
:28"Is there something we are missing?
Many thanks in advance for your help
Beta Was this translation helpful? Give feedback.
All reactions