Answer:
Explanation:
we would be analyzing this question with the important code given
#code
:
from collections import namedtuple
#creating a named tuple named 'Player' with field names name, number, position and team
Player = namedtuple('Player',['name','number','position', 'team'])
cam = Player('Cam Newton','1','Quarterback','Carolina Panthers')
lebron = Player('Lebron James','23','Small forward','Los Angeles Lakers')
print(cam.name+'(#'+cam.number+')'+' is a '+cam.position+' for the '+cam.team+'.')
print(lebron.name+'(#'+lebron.number+')'+' is a '+lebron.position+' for the '+lebron.team+'.')
NB:
Lebron James (#23) rep. Small forward for the LA lakers
Cam Newton(#1) rep. a Quaterback for the Carolina Panthers
cheers i hope this helps