shouldz

Algoritmo médico simples

Aug 9th, 2018
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. class médico:
  2. def __init__(self, nome, numero, especialidade):
  3. self.nome = nome
  4. self.ninscrição = numero
  5. self.especialidade = especialidade
  6.  
  7. def receituario(self):
  8. print(f'Nome: {self.nome}\nNúmero de Inscrição: {self.ninscrição}\nEspecialidade: {self.especialidade}')
  9.  
  10. def alterarnome(self):
  11. x = str(input('Deseja alterar o nome? ')).lower().strip()[0]
  12. if x == 's':
  13. self.nome = str(input('Digite o nome: ')).title().strip()
Advertisement
Add Comment
Please, Sign In to add comment