Computers and Technology

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:

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 21:00, htahir2345
You turn your computer on and the computer will not boot up where is something you should do to diagnose the problem?
Answers: 1
image
Computers and Technology, 21.06.2019 23:00, fluffy374747
The animal classthis class represents a an animal residing at a zoo. it has a weight (in pounds),height (in inches), a name, and a color. the methods in the class include constructors, getters, and a tostring. you will finish the implementation of these methods. referto the code documentation.1.getters: you will need to implement getter methods. these get a value (froma member variable) in the animal class. you will make a getter method toreturn each variable (weight, height, name, color). reference getname if youare having issues.2.tostring: you will need to finish the tostring method. this returns a stringcontaining information about an animal. the output string should be of theformat: ” (name) , a ( color )â’colored animal . ( weight ) pounds , ( height ) inches .\n”the height and weight are formatted to 1 decimal place. recall from lab 1how to format strings neatly using string. see the reference sectionfor more about string. format.
Answers: 2
image
Computers and Technology, 22.06.2019 23:50, Crull5999
List a few alternative options and input and output over the standerd keyboard and monitor. explain their functioning in details.
Answers: 2
image
Computers and Technology, 23.06.2019 22:00, rocksquad9125
Take a critical look at three gui applications you have used—for example, a spreadsheet, a word-processing program, and a game. describe how well each conforms to the gui design guidelines listed in this chapter.
Answers: 3
Do you know the correct answer?
Your program is going to compare the scores of two volleyball teams that play each other. to win a m...

Questions in other subjects:

Konu
History, 14.07.2020 03:01
Konu
Mathematics, 14.07.2020 03:01
Konu
Mathematics, 14.07.2020 03:01
Konu
Mathematics, 14.07.2020 03:01