There are two problems as before. The non-robot problem is an individual assignment and the robot problem is a team assignment.
>>> from Scores import * >>> main() Enter score (0 to stop): 63 Enter score (0 to stop): 75 Enter score (0 to stop): 72 Enter score (0 to stop): 72 Enter score (0 to stop): 78 Enter score (0 to stop): 67 Enter score (0 to stop): 80 Enter score (0 to stop): 63 Enter score (0 to stop): 75 Enter score (0 to stop): 90 Enter score (0 to stop): 89 Enter score (0 to stop): 43 Enter score (0 to stop): 59 Enter score (0 to stop): 99 Enter score (0 to stop): 82 Enter score (0 to stop): 12 Enter score (0 to stop): 100 Enter score (0 to stop): 0 Number of "A" scores = 3 Number of "B" scores = 3 Number of "C" scores = 5 Number of "D" scores = 3 Number of "F" scores = 3 ------------------------- Total Scores = 17 Average Score = 71.0 Maximum Score = 100 Minimum Score = 12
You must implement the solution in two functions: main() and computeAnswers(L). The main() function prompts the user for the scores (one at a time, until the user enters 0) and populates a list of score. The computeAnswers(L) function examines scores in the list one at a time and performs the necessary computations to calculate the answers. It then puts all the answers in a list and returns that list.
To take the pictures, the program will use a loop similar to the one on page 102 in Kumar's book. After taking each picture, the program will display the picture in a window and cause the robot to turn left at half-speed for 0.2 seconds. The program will also capture the brightness reading for the center sensor.
The loop will continue for 30 seconds. When the loop terminates, the program will search the list of brightness readings for the largest number (indicating the highest level of brightness). The program will then open a new window and use it to display the picture that corresponds to the largest brightness reading. The new window will have the title "Brightest" displayed at the top.
You must put comments at the beginning of the program giving the program name, the names of your team members, the course number (CSc 2010), and the date.