Untitled

 avatar
unknown
python
2 years ago
919 B
2
Indexable

class Student():

    def __init__(self, UUID=str, imie=str, nazwisko=str, lista_ocen=list):
        self.UUID = UUID
        self.imie = imie
        self.nazwisko = nazwisko
        self.lista_ocen = lista_ocen

class Ocena():

    def __init__(self, ocena=float, typ_oceny=str, termin=int, data_wpisu=None):
        self.ocena = ocena
        self.typ_oceny = typ_oceny
        self.termin = termin
        self.data_wpisu = data_wpisu


class Program():

    def __init__(self, lista_ocen, nowa_ocena=None):
        self.lista_ocen = lista_ocen
        self.nowa_ocena = None

    def wyswietlenie_listy_ocen(self):
        return self.lista_ocen

    def dodawanie_nowej_oceny(self, nowa_ocena=float):
        lista_ocen = []
        nowa_ocena = None
        lista_ocen.append(nowa_ocena)
        return lista_ocen



obiekt = Program(lista_ocen=[2.0, 4.5])
print(obiekt)

print(obiekt.wyswietlenie_listy_ocen())
Editor is loading...