Created
May 5, 2016 01:06
-
-
Save vmesel/70343dba30240ba1d45488c7fd689a72 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def milhoes(self, num): | |
*milhoes,mil2,mil1,mil0, cen, dez, uni = num | |
aux_milhoes = self.transcrever("".join(milhoes)) | |
aux_num = "{m2}{m1}{m0}{c}{d}{u}".format(m2=mil2,m1=mil1,m0=mil0,c=cen,d=dez,u=uni) | |
if aux_num == "000000": | |
return(aux_milhoes + "milhões") | |
else: | |
return("{mi} milhões e {m}").format(mi=aux_milhoes,m=self.milhar(aux_num)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment