<jupyter_start><jupyter_text>Um pouco mais de listas---* Exercitando um pouco mais...* append()  Exercitando um pouco mais---<jupyter_code>nomes = [
         'Pedro', 'Joao', 'Ronaldo',
         'Fernanda', 'Beatriz', 'Julia',
         'Andre', 'Pollyana', 'Cristina'
        ]

idades = [
    22, 15, 42,
    18, 22, 22,
    60, 45, 40,
         ]

sexos = [
    'M', 'M', 'M',
    'F', 'F', 'F',
    'M', 'F', 'F',
        ]<jupyter_output><empty_output><jupyter_text>* Deseja-se criar uma lista única contendo a informação dos clientes juntas em uma única lista. Por exemplo:```python['Pedro', '22', 'M']```<jupyter_code>['asds'] + ['pedro', 55]
i = 0
clientes = list()

while i < len(nomes):
    pessoa = []
    pessoa += [nomes[i]] + [idades[i]] + [sexos[i]]
    clientes += [pessoa]
    i += 1
    
clientes<jupyter_output><empty_output><jupyter_text>* Deseja-se saber pela lista principal, isto é, a lista criada no item anterior a porcentagem de mulheres cadastradas.<jupyter_code>total_mulheres = 0
for cliente in clientes:
    if cliente[-1] == 'F':
        total_mulheres += 1

print(f'A porcentagem de mulheres é de {total_mulheres / len(clientes):.2%}')<jupyter_output>A porcentagem de mulheres é de 55.56%<jupyter_text>* Deseja-sa saber quantos salários estão abaixo de 100.00 R\$<jupyter_code>salarios = [
       105.5757884 , 104.98012268, 107.73049895, 100.27738037,
       102.21331402, 101.09320373, 106.96144428, 100.66423428,
       105.99189946, 106.50992381, 101.47475504, 103.73941688,
       106.94716924, 107.78937851, 101.36581573, 108.43609976,
       106.58673737, 104.80475629, 101.05021275, 104.62883049,
       108.83855616, 103.45581569, 106.71278059, 107.81901194,
       108.24677615, 105.14519194, 104.88765718, 105.70393216,
       109.11349047, 100.95373985, 102.58055003, 104.39604542,
       103.27366611, 104.77213162, 100.58850982, 105.1277737 ,
       104.1267712 , 104.58699754, 102.07397942, 104.56813412,
       101.24716723, 104.21114761, 104.33032986, 107.19956414,
       103.38597661, 105.84102125, 106.34533277, 108.94411667,
       103.45287934, 105.38944762, 105.99601435, 102.68063962,
       101.88479135, 104.52597913, 108.83678768, 109.24253338,
       100.40668319, 108.76947774, 109.32434772, 100.04350292,
       106.6052402 , 101.83880872, 103.39234115, 109.85727551,
       103.14426005, 100.97877694, 105.91004386, 101.53928713,
       100.07012218, 107.208801  , 107.41110026, 108.78330961,
       101.04178322, 107.54000095, 106.7778785 , 104.25078158,
       105.94533295, 102.80105094, 100.60870825, 101.52721128,
       104.557348  , 104.52351051, 104.65210306, 109.96819877,
       107.42744408, 105.69449011, 107.48077055, 106.13272271,
       106.52568121, 103.97470434, 105.06970363, 107.83725884,
       106.55861441, 103.84686203, 108.9752333 , 104.81829826,
       107.35404202, 108.64327312, 105.09805495, 101.35249376,
       100.94820122, 104.66923705, 101.91049902, 104.72539443,
       103.49755904, 101.82553938, 104.25381508, 101.19172254,
       102.01824994, 109.22591795, 109.77437575, 107.60321286,
       103.42703715, 101.54325852, 103.79293059, 107.09878812,
       108.41790977, 109.95290307, 109.23843559, 100.57354761,
       102.59157394, 108.45071444, 107.51829345, 104.12136853,
       104.28920969, 106.74478643, 102.79847466, 109.55588734,
       101.43849607, 102.43513217, 100.4164658 , 108.22133106,
       100.20169166, 104.13257948, 100.93257843, 102.10589214,
       100.61173658, 102.09193172, 104.72578016, 109.45324769,
       108.28787725, 103.18095641, 105.13874503, 103.39337334,
       105.59512781, 107.45440662, 108.26067431, 102.73688569,
       100.94001004, 108.24972836, 107.43131322, 100.56731556,
       105.74065169, 103.02131524, 109.26471254, 108.92399296,
       102.11372404, 100.68672308, 102.74010674, 109.84896699,
       100.43267706, 103.67123633, 108.00150159, 108.6814573 ,
       109.82831977, 105.01583244, 100.78587751, 109.24509488,
       100.01481608, 109.92340626, 103.62272866, 100.90493725,
       104.00475307, 108.14130826, 105.64120791, 100.3919802 ,
       102.0484841 , 108.15936128, 107.03563899, 103.4323541 ,
       105.82002082, 107.90889193, 102.40038616, 105.69362338,
       101.82689086, 106.83088092, 107.13710767, 104.00658656,
       103.45180129, 104.31345684, 106.93416503, 103.64910194,
       109.90245409, 101.88841229, 101.26454071, 107.54353717,
       106.51937904, 105.4057215 , 109.26335965, 100.77154942,
       108.31682216, 105.37077312, 102.29269336, 108.76025549,
       100.90694309, 106.10195155, 103.08419513, 109.82035874,
       107.0042397 , 109.83735396, 100.71883591, 102.1679822 ,
       102.13622298, 108.94660919, 104.26589427, 109.50417177,
       101.65199875, 100.1467858 , 100.45210479, 101.46240029,
       102.32188152, 104.1932249 , 101.89529694, 101.99626208,
       108.51633846, 105.52396529, 101.46659396, 108.43395611,
       109.77586562, 101.54042006, 106.98629197, 109.34427918,
       108.08842947, 108.47964414, 109.13127072, 105.98990576,
       101.55059591, 104.78443474, 108.67311519, 103.68496448,
       105.55222662, 105.69232861, 100.09258461, 102.90593476,
       100.09886291, 105.74292173, 109.3628286 , 100.17596306,
       108.54785447, 102.71717841, 105.81352263, 104.57123139,
       102.15361947, 107.60785411, 107.62097939, 101.80757211,
       101.5263517 , 107.24993383, 103.83673674, 104.54596884,
       103.27225208, 107.43723763, 109.03721924, 106.14845032,
       104.74456216, 107.17340162, 107.25054679, 101.64650578,
       102.30284909, 101.65140021, 107.83746821, 108.87951302,
       104.8716342 , 101.33198865, 100.34421357, 100.60066484,
       107.11105659, 104.05039248, 107.58681762, 104.95015191,
       102.60619561, 105.85680149, 108.33843569, 103.48947594,
       106.38844463, 106.93850188, 107.32614073, 104.22001572,
       106.54357841, 101.09372083, 107.31618639, 107.94501786,
       106.02390173, 105.72528638, 106.61329343, 107.38455569,
       108.28275392, 100.68994847, 105.28006582, 101.9567718 ,
       107.9044981 , 102.05029005, 104.84486004, 106.21095826,
       105.76239082, 109.82562244, 108.9555462 , 103.46099477,
       108.55069339, 108.73374322, 100.5101291 , 108.45052422,
       104.34163819, 102.97170767, 100.15588705, 100.43162495,
       102.81404976, 105.12108497, 104.97472785, 103.35767454,
       101.41339602, 106.55428987, 101.557201  , 109.46883498,
       107.38325607, 105.56719615, 105.12869385, 101.13024901,
       106.53074075, 106.06681057, 107.84056468, 107.8152707 ,
       103.89601564, 106.81250698, 101.16042282, 102.72550082,
       106.95293046, 102.15231474, 108.88075549, 105.51509209,
       104.94592968, 109.29085868, 103.51606331, 100.62291549,
       108.87157246, 109.53392541, 103.69243447, 100.12251852,
       109.06734056, 100.08675367, 107.68590293, 101.14374729,
       107.41004761, 102.20558482, 105.11906524, 102.63298392,
       102.5630983 , 109.38987054, 105.7135334 , 101.76818069,
       102.08368832, 107.58437103, 102.05426741, 103.01527859,
       101.85574746, 105.78797923, 107.53266131, 104.9629417 ,
       107.66583861, 109.44091619, 100.95050141, 100.26434144,
       106.55896433, 103.73168659, 103.51820907, 108.29269008,
       102.45191384, 103.73116278, 107.81416375, 107.25887168,
       103.00678852, 105.17311921, 109.50861515, 101.52699577,
       104.94560778, 104.33391999, 101.74827158, 107.16301215,
       105.55439793, 100.71549893, 103.60992066, 104.97695359,
       108.50809645, 107.72945717, 106.63894978, 104.51785685,
       109.28623998, 104.53475597, 101.17752403, 100.38308016,
       106.22042715, 106.39587868, 109.64883427, 108.43270472,
       100.09475459, 106.72407758, 108.76819217, 105.27257294,
       107.26675079, 106.42977909, 100.70691985, 106.62436788,
       106.40107977, 101.75893218, 103.97571236, 106.31676077,
       102.92002484, 108.16693422, 106.18955821, 104.05511497,
       105.51353728, 102.52117798, 107.00255309, 105.98552676,
       101.98794218, 101.01509832, 103.41319985, 103.04812813,
       100.96712344, 100.09667222, 103.17082951, 103.40840845,
       105.95636639, 108.11850515, 106.69798912, 105.10321459,
       102.91174917, 102.14571075, 102.72700464, 104.23154595,
       101.11600116, 102.2485665 , 107.11427124, 106.52899571,
       107.72952499, 105.0690302 , 107.87346798, 100.38134796,
       106.00903598, 108.47448782, 101.41865497, 101.99977502,
       106.32746222, 103.924496  , 105.47501821, 103.98662973,
       105.58304184, 100.80208658, 106.07920125, 108.44519377,
       103.38274764, 102.89179868, 105.22244955, 104.91764894,
       102.21044104, 104.20867412, 109.17523608, 104.83147116,
       103.70401943, 101.68120776, 108.14018961, 107.27714034,
       101.89666852, 101.39143423, 100.06839202, 100.60542941,
       101.70212729, 103.176876  , 108.11158473, 104.24430149,
       108.07683178, 103.88172712, 107.42408502, 105.41962585,
       100.07705601, 103.90905324, 109.06048889, 107.69555951,
       106.77904162, 103.76079308, 109.17808666, 102.46699884,
       108.27702749, 102.66881225, 103.96103088, 109.28142758,
       102.66276812, 102.96589368, 105.42897962, 100.11054407]
total_mulheres = 0
for cliente in clientes:
    if cliente[-1] == 'F':
        total_mulheres += 1

print(f'A porcentagem de mulheres é de {total_mulheres / len(clientes):.2%}')
# Solução

abaixo_de_100 = 0

for salario in salarios:
    if salario < 100.0:
        abaixo_de_100 += 1
print(f'A quantidade de salário abaixo de 100 R$ é de {abaixo_de_100 / len(salarios) :.3%}')
# Solução

abaixo_de_105 = 0

for salario in salarios:
    if salario < 105.0:
        abaixo_de_105 += 1
print(f'A quantidade de salário abaixo de 105 R$ é de {abaixo_de_105 / len(salarios) :.3%}')<jupyter_output>A quantidade de salário abaixo de 105 R$ é de 51.600%<jupyter_text>append()---<jupyter_code>filmes = ['home<NAME>', 'o cahorro louco', 'juca tatu']
filmes.append('A vaca doida')
filmes
filmes.append('Python é louco')
filmes
i = 0
clientes = list()

while i < len(nomes):
    pessoa = []
    pessoa += [nomes[i]] + [idades[i]] + [sexos[i]]
    clientes += [pessoa]
    i += 1
    
clientes
i = 0
clientes = list()

while i < len(nomes):
    pessoa = []
    pessoa.extend([nomes[i]] + [idades[i]] + [sexos[i]])
    clientes.append(pessoa)
    i += 1
   
clientes<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13356461405030357, 'fraction_numerical': 0.5350293919244483, 'mean_word_length': 3.2101419878296147, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '302176', 'license': 'MIT', 'n_tokens_mistral': 8210, 'n_tokens_neox': 4488, 'n_words': 758, 'path': 'arquivos-aulas/cap-5-listas/.ipynb_checkpoints/cap 5 - listas - 2-checkpoint.ipynb', 'repo_name': 'kitawarairon/curso-pyton-engenharia', 'size': '10379'}