Question: Problem # 2 : Robotics Match Suppose you are running a competitive robotics league and want to determine how many ranking levels each team in
Problem #: Robotics Match
Suppose you are running a competitive robotics league and want to determine how many ranking levels each team in a competition is going to earn during a given twoteam match. A team receives ranking level for tying, or ranking levels for winning. There is a possibility to get more bonus ranking levels: for achieving a special bonus called strike, and another level for excelling at climbing. Your function, rankinglevels, should take in the following parameters, which represent the scoring activity of the two teams: Red and Blue.
redpoints: a list of scores integers in the following order auto drilling, climbing
bluepoints: a list of the same format
redfoul: True if the Red team committed a foul
bluefoul: True if the Blue team committed a foul
Note: the function is called "rankingpoints" by mistake in CodeGrade. Pretend it says "rankinglevels", but don't change the name of the function in your code.
The score of each team is simply the sum of its auto, drilling, and climbing scores. The team with the higher total score wins ranking levels for the winner If the total scores match, the teams tie ranking level each
For a team to earn the bonus ranking level for the strike bonus, the following must be true: drilling must be greater than ; OR auto must be greater than and drilling must be greater than
For a team to earn the bonus ranking level for excelling in climbing, the climbing score for the team must be greater than OR a foul must have been committed by the other team. If both of these possibilities have happened, the team still only gets additional ranking level, not
Your function should return the number of ranking levels earned by the Red team, followed by the number of ranking levels earned by the Blue team.
Let's look at an example in detail: rankinglevels False, True
Blue earns ranking levels for having the higher score. Levels: vs for Red vs Blue
Red earns ranking level for having a drilling score and Blue earns ranking level for having an auto score and a drilling score Levels: vs
Blue committed a foul, so Red earns ranking level. Levels: vs
Blue's climbing score is greater than so it earns ranking level. Levels: vs
The function returns
Function Call
Expected Return Value pair
rankinglevels False, False
rankinglevels False, False
rankinglevels False, True
rankinglevels True, False
rankinglevels True, True
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
