num random randrange( if num = return true elsereturn false for in range( )simulation( discussion we were trying to answer question about whether the current printer could handle the task load if it were set to print with better quality but slower page rate the approach we took was to write simulation that modeled the printing tasks as random events of various lengths and arrival times the output above shows that with pages per minute printingthe average waiting time varied from low of seconds to high of seconds (about minuteswith faster printing ratethe low value was second with high of only in additionin out of runs at pages per minute there were print tasks still waiting in the queue at the end of the hour thereforewe are perhaps persuaded that slowing the printer down to get better quality may not be good idea students cannot afford to wait that long for their papersespecially when they need to be getting on to their next class six-minute wait would simply be too long this type of simulation analysis allows us to answer many questionscommonly known as "what ifquestions all we need to do is vary the parameters used by the simulation and we can simulate any number of interesting behaviors for examplewhat if enrolment goes up and the average number of students increases by what if it is saturday and students are not needing to get to classcan they afford to waitwhat if the size of the average print task decreases since python is such powerful language and programs tend to be much shorterthese questions could all be answered by modifying the above simulation howeverit is important to remember that the simulation is only as good as the assumptions that are used to build it real data about the number of print tasks per hour and the number of students per hour was necessary to construct robust simulation self check how would you modify the printer simulation to reflect larger number of studentssuppose that the number of students was doubled you make need to make some reasonable assumptions about how this simulation was put together but what would you changemodify the code also suppose that the length of the average print task was cut in half change the code to reflect that change finally how would you parameterize the number of studentsrather than changing the code we would like to make the number of students parameter of the simulation queues