File tree 1 file changed +9
-9
lines changed
1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 5
5
No final, tudo isso será guardado em um dicionário, incluindo o total de gols feitos durante o campeonato.
6
6
"""
7
7
8
- dicio = {'nome' : str (input ('Nome do Jogador: ' )), 'gols' : []}
9
- totpart = int (input (f'Quantas partidas { dicio ["nome" ]} jogou? ' ))
8
+ jogador = {'nome' : str (input ('Nome do Jogador: ' )), 'gols' : []}
9
+ totpart = int (input (f'Quantas partidas { jogador ["nome" ]} jogou? ' ))
10
10
11
11
for p in range (0 , totpart ):
12
- dicio ['gols' ].append (int (input (f' Quantos gols na partida { p + 1 } ? ' )))
12
+ jogador ['gols' ].append (int (input (f' Quantos gols na partida { p + 1 } ? ' )))
13
13
14
14
print ('-=' * 30 + '-' )
15
15
16
- dicio ['total' ] = sum (dicio ['gols' ])
17
- print (dicio )
16
+ jogador ['total' ] = sum (jogador ['gols' ])
17
+ print (jogador )
18
18
19
19
print ('-=' * 30 + '-' )
20
20
21
- for k , v in dicio .items ():
21
+ for k , v in jogador .items ():
22
22
print (f'O campo { k } tem o valor { v } .' )
23
23
24
24
print ('-=' * 30 + '-' )
25
25
26
- print (f'O jogador { dicio ["nome" ]} jogou { totpart } partidas.' )
26
+ print (f'O jogador { jogador ["nome" ]} jogou { totpart } partidas.' )
27
27
28
- for k , v in enumerate (dicio ['gols' ]):
28
+ for k , v in enumerate (jogador ['gols' ]):
29
29
print (f' => Na partida { k + 1 } , fez { v } gols.' )
30
30
31
- print (f'Foi um total de { dicio ["total" ]} gols.' )
31
+ print (f'Foi um total de { jogador ["total" ]} gols.' )
You can’t perform that action at this time.
0 commit comments