Advertisement
Guest User

Untitled

a guest
Sep 26th, 2012
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.43 KB | None | 0 0
  1. convenios = {
  2.   'publico': 0.0,
  3.   'particular': 100.0,
  4. }
  5.  
  6. setores = {
  7.   'pediatria': 200.0,
  8.   'oncologia': 1000.0,
  9.   'geral': 100.0
  10. }
  11.  
  12. def calculaConsulta (convenio):
  13.     if convenio in convenios.keys():
  14.         return convenios[convenio]
  15.     raise Exception("convenio nao encontrado")
  16.  
  17.  
  18. def calculaPlantao(setor):
  19.     if setor in setores.keys():
  20.         return setores[setor]
  21.     raise Exception("setor nao encontrado")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement