subject

(PYTHON) Complete the program to print out nicely formatted football player statistics. Match the following output as closely as possible -- the ordering of players is not important for this example. 2012 quarterback statistics:
Passes completed:
Greg McElroy : 19
Aaron Rodgers : 371
Peyton Manning : 400
Matt Leinart : 16
Passing yards: ...
Touchdowns / Interception ratio:
Greg McElroy : 1.00
Aaron Rodgers : 4.88
Peyton Manning : 3.36
Matt Leinart : 0.00
quarterback_stats = {
'Aaron Rodgers': {'COMP': 371, 'YDS': 4925, 'TD': 39, 'INT': 8},
'Peyton Manning': {'COMP': 400, 'YDS': 4659, 'TD': 37, 'INT': 11},
'Greg McElroy': {'COMP': 19, 'YDS': 214, 'TD': 1, 'INT': 1},
'Matt Leinart': {'COMP': 16, 'YDS': 115, 'TD': 0, 'INT': 1}
}

print('2012 quarterback statistics:')

print(' Passes completed:')
for qb in quarterback_stats:
comp = quarterback_stats[qb]['COMP']
#print(' %?: %?' % (qb, comp)) # Replace conversion specifiers
# Hint: Use the conversion flag '-' to left-justify names

print(' Passing yards:')
for qb in quarterback_stats:
print(' QB: yards')

print(' Touchdown / interception ratio:')
# ...
# Hint: Convert TD/INTs to float before calculating ratio

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 07:00, MissSmartyPants88
To produce a starlight effect in her photograph, lina should choose the filter for her camera.
Answers: 1
image
Computers and Technology, 24.06.2019 18:00, valdezavery9018
Hacer un algoritmo que me permita ingresar el nombre de una parcela de terreno y muestre junto al mensaje “tipo de suelos: suelos fumíferos, ¡excelente!
Answers: 1
image
Computers and Technology, 24.06.2019 18:30, trevorhenyan51
Dereck works for long hours on his computer.  he frequently experiences physical strain by the end of the day because he does not follow an important rule of ergonomics with respect to the use of keyboards.  which of the following actions of dereck could lead to physical strain? a.  placing the keyboard exactly in front of him while typingb.  keeping hands and wrists straight while typingc.  using wrist pads throughout the dayd.  pounding at the keys on the keyboard while typinge.  resting his hands on the keyboard when he is not typing
Answers: 1
image
Computers and Technology, 24.06.2019 23:00, Kaziyah461
People should never use telepresence when virtually meeting with a group of co-workers. true false
Answers: 1
You know the right answer?
(PYTHON) Complete the program to print out nicely formatted football player statistics. Match the fo...

Questions in other subjects:

Konu
Biology, 28.08.2019 01:10