p
This commit is contained in:
parent
5b6b8a308d
commit
acd7e3d806
@ -8,10 +8,13 @@ class Garden:
|
||||
self.row1 = rows[0]
|
||||
self.row2 = rows[1]
|
||||
|
||||
if students is None:
|
||||
self.students = [
|
||||
"Alena", "Boris", "Cyril", "Daniel", "Eva", "František",
|
||||
"Gitka", "Helena", "Ivana", "Jozef", "Karol", "Ladislav"
|
||||
]
|
||||
else:
|
||||
self.students = sorted(students)
|
||||
|
||||
self.plant_names = {
|
||||
"G": "Tráva",
|
||||
@ -21,6 +24,9 @@ class Garden:
|
||||
}
|
||||
|
||||
def plants(self, student):
|
||||
if student in self.students:
|
||||
raise NoSuchStudentException()
|
||||
|
||||
index = self.students.index(student)
|
||||
pos = index * 2
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user