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 02:30
The can be used to paste text in any order
Answers: 1
question
Computers and Technology, 23.06.2019 16:30
20 points archie wants to use a reflector as he photographs a newlywed couple. what would he consider in his choice? a. shadow and sunny b. homemade and professional c. lamps and boards d. incident and reflected e. neutral density and enhancement
Answers: 3
question
Computers and Technology, 23.06.2019 23:30
Match the following errors with their definitions. a. #name b. #value c. #ref d. 1. when a formula produces output that is too lengthy to fit in the spreadsheet cell 2. when you enter an invalid cell reference in a formula 3. when you type text in cells that accept numeric data 4. when you type in a cell reference that doesn’t exist
Answers: 1
question
Computers and Technology, 24.06.2019 02:10
Aspeed limit sign that says "night" indicates the legal speed between sunset and sunrise.
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
Questions on the website: 13722359