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 00:00
Match each vocabulary word to its definition.1. desktoppicture used to represent acomputer application2. domainnetwork protectionsoftware code that can be viewed,3. iconmodified, and redistributed for freethe background screen on acomputer monitor4. url5. blogan online journalthe part of an internet address that6. firewallrefers to a group of computers on anetworkonline database of web pages7. intranetnetwork for use by an individual8. open address of a web page or9. wikiresource
Answers: 2
question
Computers and Technology, 22.06.2019 08:10
Ihave a music player on my phone. i can buy songs, add them to playlists and play them. obviously it would be redundant to store each song in each playlist; each playlist is just a list of pointers to the songs. for this lab you will simulate this behavior. your program will need to have options to: add songs to the system library (you will store the text of the first line of the song, rather than the audio) add playlists add songs to a playlist list playlists play a playlist list all of the songs in the library with a count of how many times each song has been played remove a song from a playlist remove a playlist remove a song from the library (and thus from all playlists that contain it) note that we will not be checking many error cases. in real programming this would be bad, you should usually try to recognize and respond to as many types of errors as you can. in the context of class we are trying to acquaint you with as many concepts as possible, so for the sake of educational efficiency we will not be checking most errors in this lab, you may assume that your user provides correct input. you may add all appropriate error testing if you wish, but we will not be testing for it.
Answers: 2
question
Computers and Technology, 23.06.2019 13:00
Which one of the following voltages should never be measured directly with a vom? a. 1200 v b. 500 v c. 800 v d. 100v
Answers: 2
question
Computers and Technology, 23.06.2019 15:30
Brian wants to conduct an online search with a certain phrase. he intends to use the words books that belong to the 1800s in his search. how should he use the word that in his search?
Answers: 1
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