-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalunos.py
36 lines (25 loc) · 895 Bytes
/
alunos.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from pessoa_fisica import PessoaFisica
class Aluno(PessoaFisica):
def __init__(self, nome, cpf, rg, data_nascimento, cgm, turma, turno):
super().__init__(nome,cpf, rg, data_nascimento)
self.__cgm = cgm
self.__turma = turma
self.__turno = turno
@property
def cgm(self):
return self.__cgm
@property
def turma(self):
return self.__turma
@property
def turno(self):
return self.__turno
def acessarEscola(self, codigo_acesso):
if codigo_acesso == self.cgm:
print(f'Boa aula aluno(a), {super().nome}\n')
return True
else:
return False
def __str__(self):
return f' Aluno:\n Nome: {super().nome}\n CPF:{super().cpf}\n RG:{super().rg}\n \
Data de nascimento:{super().data_nascimento}\n CGM:{self.cgm}\n\n'