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.
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.