simulation and design simulation problem susan computewell' frienddenny dibblebitplays racquetball over years of playinghe has noticed strange quirk in the game he often competes with players who are just little bit better than he is in the processhe always seems to get thumpedlosing the vast majority of matches this has led him to question what is going on on the surfaceone would think that players who are slightly better should win slightly more oftenbut against dennythey seem to win the lion' share one obvious possibility is that denny dibblebit' problem is in his head maybe his mental game isn' up to par with his physical skills or perhaps the other players are really much better than he isand he just refuses to see it one daydenny was discussing racquetball with susanwhen she suggested another possibility maybe it is the nature of the game itself that small differences in ability lead to lopsided matches on the court denny was intrigued by the ideahe didn' want to waste money on an expensive sports psychologist if it wasn' going to help but how could he figure out if the problem was mental or just part of the gamesusan suggested she could write computer program to simulate certain aspects of racquetball using the simulationthey could let the computer model thousands of games between players of differing skill levels since there would not be any mental aspects involvedthe simulation would show whether denny is losing more than his share of matches let' write our own racquetball simulation and see what susan and denny discovered analysis and specification racquetball is sport played between two players using racquets to strike ball in four-walled court it has aspects similar to many other ball and racquet games such as tennisvolleyballbadmintonsquashtable tennisetc we don' need to understand all the rules of racquetball to write the programjust the basic outline of the game to start the gameone of the players puts the ball into play--this is called serving the players then alternate hitting the ball to keep it in playthis is rally the rally ends when one of the players fails to hit legal shot the player who misses the shot loses the rally if the loser is the player who servedthen service passes to the other player if the server wins the rallya point is awarded players can only score points during their own service the first player to reach points wins the game in our simulationthe ability-level of the players will be represented by the probability that the player wins the rally when he or she serves thusplayers with probability win point on of their serves the program will prompt the user to enter the service probability for both players and then simulate multiple games of racquetball using those probabilities the program will then print summary of the results here is detailed specificationinput the program first prompts for and gets the service probabilities of the two players (called "player aand "player "then the program prompts for and gets the number of games to be simulated