simulation and design the player wins the point when serving player always has the first serve what is the prob player wins serve what is the prob player wins serve how many games to simulate games simulated wins for ( %wins for ( %even though there is only small difference in abilitydenny should win only about one in three games his chances of winning threeor five-game match are pretty slim apparentlydenny is winning his share he should skip the shrink and work harder on his game speaking of matchesexpanding this program to compute the probability of winning multi-game matches would be great exercise why don' you give it try other design techniques top-down design is very powerful technique for program designbut it is not the only way to go about creating program sometimes you may get stuck at step and not know how to go about refining it or the original specification might be so complicated that refining it level-by-level is just too daunting prototyping and spiral development another approach to design is to start with simple version of program or program component and then try to gradually add features until it meets the full specification the initial stripped-down version is called prototype prototyping often leads to sort of spiral development process rather than taking the entire problem and proceeding through specificationdesignimplementationand testingwe first designimplementand test prototype then new features are designedimplementedand tested we make many mini-cycles through the development process as the prototype is incrementally expanded into the final program as an exampleconsider how we might have approached the racquetball simulation the very essence of the problem is simulating game of racquetball we might have started with just the simonegame function simplifying even furtherour prototype could assume that each player has - chance of winning any given point and just play series of rallies that leaves the crux of the problemwhich is handling the awarding of points and change of service here is an example prototypefrom random import random def simonegame()