Update u5/kindergarten_garden.py

This commit is contained in:
Roman Dmytruk 2026-10-13 12:48:11 +00:00
parent f9e79faf64
commit fc53cd35d2

View File

@ -1,4 +1,4 @@
class NoSuchStudentIsFound(Exception): class NoSuchStudentException(Exception):
pass pass
@ -28,7 +28,7 @@ class Garden():
def plants(self, students_name : str): def plants(self, students_name : str):
if students_name not in self.students: if students_name not in self.students:
raise NoSuchStudentIsFound(f"Učeň {student_name} neexistuje v tomto záhone.") raise NoSuchStudentException(f"Učeň {student_name} neexistuje v tomto záhone.")
student_index = self.students.index(students_name) student_index = self.students.index(students_name)