daily pastebin goal
26%
SHARE
TWEET

Untitled

a guest Nov 17th, 2017 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class cep():
  2.   def __init__(self, cep):
  3.     self.cep = str(cep)
  4.     self.formatado = ""
  5.  
  6.   def get(self):
  7.     for i in range(0,9):
  8.       self.formatado += self.cep[i]
  9.       if i == 5:
  10.         self.formatado += "-"
  11.  
  12.   def set(self):
  13.     return "Seu cep é {}" .format(self.formatado)
  14.  
  15.  
  16. victor = cep(123456789)
  17. victor.get()
  18. print (victor.set())
  19.  
  20. lucas = cep(789456123)
  21. lucas.get()
  22. print (lucas.set())
RAW Paste Data
Top