Advertisement
Guest User

2960 - Era Uma Vez…

a guest
Oct 17th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.96 KB | None | 0 0
  1. nomelinguagem = []
  2. total = []
  3. total2 = []
  4.  
  5. vogais = list('aeiou')
  6. vogac = 0
  7. consc = 0
  8.  
  9. vezes = int(input())
  10. for i in range(vezes):
  11.     vezesvezes = int(input())
  12.     iniciaislivros = []
  13.     for i in range(vezesvezes):
  14.         livro = input()
  15.         iniciaislivros.append((livro[:1]).lower())
  16.     iniciaislivro = ''.join(iniciaislivros)
  17.     total.append(''.join(iniciaislivros))
  18.     nomelinguagem.append((iniciaislivro[:1]).upper())
  19.  
  20. for i in total:
  21.     for x in i:
  22.         if x not in total2:
  23.             total2.append(x)
  24.  
  25. for i in total2:
  26.     if i in vogais:
  27.         vogac += 1
  28.     else:
  29.         consc += 1
  30.  
  31. nomelinguagem = ''.join(nomelinguagem)
  32.  
  33. tempo = (len(total2)+vogac)/consc
  34.  
  35. print('Nome da Linguagem: {}'.format(nomelinguagem.upper()))
  36. print('Lista de Palavras:')
  37. for i in total:
  38.     print(i)
  39. print('Número de Vogais: {}'.format(vogac))
  40. print('Número de Consoantes: {}'.format(consc))
  41. print('Número Total de Letras: {}'.format(len(total2)))
  42. print('Tempo para aprender: {:.1f} horas'.format(tempo))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement