subject

Score the raceintroductionsome number of teams are participating in a race. you are not told how many teams are participating but you do know that:  each team has a name, which is one of the uppercase letters a-z. no two teams have the same name, so there are a maximum number of 26 teams. each team has the same number of members. no two runners cross the finish line at the same time – i. e. there are no ties. at the end of the race we can write the results as a string of characters indicating the order in which runners crossed the finish line. for example: zzazaawe can see there were two teams: a and z. team a’s runners finished in 3rd, 5th and 6th place. team z’s runners finished in 1st, 2nd and 4th place. scoring the raceeach runner is assigned a score equal to their finishing place. in the example above team z’s runners achieved scores of 1, 2 and 4. team a’s runners scores were 3, 5, and 6 respectively. the team’s score is the sum of the members score divided by the number of people on the team. so team a’s score is (3+5+6)/3 = 14/3=4.66 and team z’s score is (1+2+4)/3=7/3=2.33the problemwrite a program to score races as described above. inputyour program will ask the user to input a string of uppercase characters indicating the outcome of a race. outputyour program will output:  the number of teams. the number of runners on a team. the names of the teams – in alphabetical order - together with the team score. the name and score of the winning team. so for the example above the program will print: there are 2 teams. each team has 3 runners. team scorea 4.66z 2.33the winning team is team z with a score of 2.33.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:00
The fourth generation of computers emerged between 1970s and 1980s. which technological advancement brought about this generation of computers? which computer architecture was used most in this generation?
Answers: 3
question
Computers and Technology, 23.06.2019 04:31
Q14 what is most important for you to choose before you build a network? a. private network b. nos c. network media d. network protocol e. directory service
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
:you areto design the controller for alight that functions both as an ordinary light and also as a motion activated light and alarm. a.if the manual switch s is on, then the light l is on. b.besides the manual switch, there is a motion detector, m1, which activatesthis light.c.if motion is detected but the light is on anyway because s is on, only then a secondoutput a, an alarm, is turned on. d.the disable switch, d, disables the motion activated light and alarmbut leaves manual control operation of the light using switch s.(i)read the problem statement and clearly identify the inputs and outputs for the circuit you are designing. (ii)create the truth table for this system; include the light, alarm, switch, disable, and the motion sensor.(iii)draw a schematic of this system.
Answers: 1
question
Computers and Technology, 25.06.2019 05:00
Which of the following statements best deceive the relationship between carrying capacity and population size
Answers: 1
You know the right answer?
Score the raceintroductionsome number of teams are participating in a race. you are not told how man...
Questions
question
Mathematics, 20.01.2022 01:30