Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input('Número de entrevistas: '))
- genreList = []
- eyeList = []
- ageList = []
- womanList = []
- currentInterview = 1
- if n > 0:
- for k in range(n):
- print('=' * 32)
- print(' ENTREVISTA {}/{}'.format(currentInterview, n))
- print('=' * 32)
- genre = str(input('Qual é o sexo [M, F]? '))
- eye = int(input('Qual é a cor dos olhos [1 - Azul, 2 - Castanho, 3 - Verde]? '))
- age = int(input('Qual é a idade? '))
- genreList.append(genre.upper())
- eyeList.append(eye)
- ageList.append(age)
- if genre.upper() == 'F' and age >= 30:
- womanList.append(genre)
- currentInterview += 1
- else:
- print('O número de entrevistas deve ser maior que 0.')
- def getRankingAge():
- CURRENT_BEST = 0
- for key in ageList:
- if key > CURRENT_BEST:
- CURRENT_BEST = key
- return CURRENT_BEST
- def getEyesByColor():
- BLUE = 0
- BROWN = 0
- GREEN = 0
- for key in eyeList:
- if key == 1:
- BLUE += 1
- elif key == 2:
- BROWN += 1
- elif key == 3:
- GREEN += 1
- return BLUE, BROWN, GREEN
- def getWomenOver30():
- TOTAL = 0
- for key in womanList:
- TOTAL += 1
- return TOTAL
- def getTotalMen():
- TOTAL = 0
- for key in genreList:
- if key == 'M':
- TOTAL += 1
- return TOTAL
- print('=' * 32)
- print(' RESULTADO')
- print('=' * 32)
- print('Maior idade: {}'.format(getRankingAge()))
- print('Azul: {}'.format(getEyesByColor()[0]))
- print('Castanho: {}'.format(getEyesByColor()[1]))
- print('Verde: {}'.format(getEyesByColor()[2]))
- print('Mulheres acima de 30 anos: {}'.format(getWomenOver30()))
- print('Homens que participaram: {}'.format(getTotalMen()))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement