Advertisement
PedroPauloFO

Cria Login

Jun 26th, 2014
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. # coding: utf-8
  2. # Programação 1, 2014.1 Pedro Paulo
  3. # Cria Login
  4.  
  5. def cria_login(nome):
  6.     lista_nome = nome.split()
  7.     login = lista_nome[0].lower()
  8.     lista_nome = lista_nome[1::1]
  9.     for pal in lista_nome:
  10.         if pal != "de" and pal != "do" and pal != "da":
  11.             login = login + pal[0].lower() 
  12.     print "%s: %s" % (nome, login)
  13.    
  14. nome = raw_input()
  15. while nome != "fim":
  16.     cria_login(nome)
  17.     nome = raw_input()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement