Validation Bug in part01-20_students_in_groups
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- javascript, python
- Domain
- testing-qa
Research direction
Start by locating the automatic grader for the part01-20_students_in_groups exercise and run it against the submitted solution and the correct solution described in the issue. Check how expected output is validated, then add or adjust coverage so the incorrect solution is rejected while the correct group count is accepted.
Written by the indexing model from the issue text.
Description
I believe there may be an issue with the automatic grader for the "Students in groups" exercise.
I submitted the following solution, not expecting it to pass, and it was accepted as correct:
python
student = int(input("How many students on the course? "))
grsize = int(input("Desired group size? "))
grnum = int(student // grsize)
if grnum != 3 or 5 or 7:
print(f"Number of groups formed: {grnum}")
if grnum == 3 or 5 or 7:
print(f"Number of groups formed: {grnum + 1}")
Output 1:
How many students on the course? 8
Desired group size? 4
Number of groups formed: 2
Number of groups formed: 3
Output 2:
Output
How many students on the course? 11
Desired group size? 3
Number of groups formed: 3
Number of groups formed: 4
Correct solution:
students = int(input("How many students on the course? "))
group_size = int(input("Desired group size? "))
groups = (students + group_size - 1) // group_size
print("Number of groups formed:", groups)
I wanted to report this in case the test suite is missing some test cases or is not validating the output strictly enough.
Thank you for all the work you put into the course.
- Dominant language
- JavaScript
- Stars
- 77
- Forks
- 30
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rage/programming-26
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
rage/programming-26#74 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
rage/programming-26#68 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
rage/programming-26#62 ·
-
A typo in Part 4 Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
rage/programming-26#56 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
rage/programming-26#55 ·
All issues in rage/programming-26
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·