subject

Your program is going to compare the scores of two volleyball teams that play each other. to win a match in volleyball, a team must get 25 points. but the team must also win by 2. so even if a team reaches 25, that game continues until one team is ahead by 2 points. let’s assume that these two teams are going to play five matches. your program should accept from the user the scores for each team one match at a time. if at any time that user enters scores that violate the 25-point rule or the "win by 2" point rule, print an error on the screen and make the user enter both scores again. when the user is finished entering the scores, the program should print which team won the game. this is the team that won the most matches. you have to use arrays and loops in this assignment.

is there a way i can do this code without using a break statement and using arrays and loops? i have this code so far but it uses break statement and doesn't use arrays. when i take away the break statement, instead of increasing in match number and stopping at 5 matches, it keeps listing match 1.

print("welcome to the volleyball score program. ")

#loop counter
i=1

# variable to store the wins
team1_win=0
team2_win=0

matches = [1, 2, 3, 4, 5]

# looping
while i < = 5:

# looping to get the valid input
while true:

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:50
Assume that you have an sorted array of records. assume that the length of the array (n) is known. give two different methods to search for a specific value in this array. you can use english or pseudo-code for your algorithm. what is the time complexity for each algorithm and why?
Answers: 1
question
Computers and Technology, 22.06.2019 11:30
To hide gridline when you display or print a worksheet
Answers: 1
question
Computers and Technology, 23.06.2019 09:00
Which is the highest level of the hierarchy of needs model? a. humanity b. intrapersonal c. team d. interpersonal
Answers: 1
question
Computers and Technology, 23.06.2019 11:00
Describe three characteristics of at-risk drivers. a. b. c. describe three characteristics of safe drivers. a. b. c. describe three driver errors that could cause a collision. a. b. c. how will this information affect you as a driver now and in the future? (2-3 sentences)
Answers: 2
You know the right answer?
Your program is going to compare the scores of two volleyball teams that play each other. to win a m...
Questions
question
Mathematics, 07.02.2021 02:00
question
Biology, 07.02.2021 02:00
question
Mathematics, 07.02.2021 02:00
question
History, 07.02.2021 02:00