Question: Python code: evaluate _ players ( players _ names, players _ scores, threshold ) : Description: You are provided with a one - dimensional list
Python code:
evaluateplayersplayersnames, playersscores, threshold:
Description: You are provided with a onedimensional list of player names and a D list of their scores
based on preassessments conducted before the start of the competition, along with a passing score
threshold. Your function should search through each player's name and check if their total score is equal
to or greater than the threshold. If a player does not meet the threshold, their name should be removed
from the list.
Parameters: playersnames a list of strings indicating players names. The list may be empty.
playersscores A twodimensional list of player names strings and their scores on a preassessment step they have already taken. The preassessments are of variable length.
threshold an integer representing a passing score.
Assumptions: The names in playernames will always appear in playerscores. Some names in
playerscores might not be in playernames.
Restrictions: You may use range len del, removepop for this function.
You are not allowed to import anything. You are not allowed to use list slicing. str float int are allowed in each function. You are not allowed to use any string method. You are not allowed to use sets and dictionaries.
Return value: None. The list playersnames is modified in place.
Examples:
playersnames Raul "Pam", "Eva", "Ginny"
playersscores RaulMikePam
EvaJaneGinny
threshold
evaluateplayers playersnames, playersscores, threshold
printplayersnamesPam 'Ginny'
playersnames Raul"Pam","Eva","Ginny"
playersscores JoseRaulPam
JuliaEvaGinnyRose
threshold
evaluateplayers playersnames, playersscores, threshold
printplayersnamesRaul 'Pam', 'Eva', 'Ginny'
playersnames Raul"Pam","Eva","Ginny"
playersscores PamEvaMike
GinnyRoseRaulDaniel
threshold
evaluateplayersplayersnames, playersscores, threshold
printplayersnamesRaul
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
