######################################### # SAMPLE RUN #1: SHOWING ALL VALIDATION # ######################################### bash-4.1$ python proj2.py Please enter number of rows: -1 That is not a valid value; please enter a number greater than or equal to 1 Please enter number of rows: 0 That is not a valid value; please enter a number greater than or equal to 1 Please enter number of rows: 4 Please enter number of columns: -9 That is not a valid value; please enter a number greater than or equal to 1 Please enter number of columns: 0 That is not a valid value; please enter a number greater than or equal to 1 Please enter number of columns: 7 Please enter the row of a cell to turn on (or q to exit): -9 That is not a valid value; please enter a number between 0 and 3 inclusive... Please enter the row of a cell to turn on (or q to exit): 15 That is not a valid value; please enter a number between 0 and 3 inclusive... Please enter the row of a cell to turn on (or q to exit): 4 That is not a valid value; please enter a number between 0 and 3 inclusive... Please enter the row of a cell to turn on (or q to exit): 2 Please enter a column for that cell: 9 That is not a valid value; please enter a number between 0 and 6 inclusive... Please enter a column for that cell: -1 That is not a valid value; please enter a number between 0 and 6 inclusive... Please enter a column for that cell: 4 Please enter the row of a cell to turn on (or q to exit): -9 That is not a valid value; please enter a number between 0 and 3 inclusive... Please enter the row of a cell to turn on (or q to exit): q How many iterations should I run? -1 That is not a valid value; please enter a number greater than or equal to 0 How many iterations should I run? 0 Starting Board: ....... ....... ....A.. ....... ############################################################################## # SAMPLE RUN #2: SHOWING TURNING CELLS "ALIVE" BEFORE GAME STARTS, AND A RUN # ############################################################################## bash-4.1$ python proj2.py Please enter number of rows: 5 Please enter number of columns: 8 Please enter the row of a cell to turn on (or q to exit): 3 Please enter a column for that cell: 3 Please enter the row of a cell to turn on (or q to exit): 2 Please enter a column for that cell: 3 Please enter the row of a cell to turn on (or q to exit): 4 Please enter a column for that cell: 3 Please enter the row of a cell to turn on (or q to exit): q How many iterations should I run? 4 Starting Board: ........ ........ ...A.... ...A.... ...A.... Iteration 1: ........ ........ ........ ..AAA... ........ Iteration 2: ........ ........ ...A.... ...A.... ...A.... Iteration 3: ........ ........ ........ ..AAA... ........ Iteration 4: ........ ........ ...A.... ...A.... ...A.... ############################################################################# # SAMPLE RUN #3: A 25-ITERATION RUN OF A "GLIDER" THAT MOVES DOWN AND RIGHT # ############################################################################# bash-4.1$ python proj2.py Please enter number of rows: 10 Please enter number of columns: 15 Please enter the row of a cell to turn on (or q to exit): 0 Please enter a column for that cell: 0 Please enter the row of a cell to turn on (or q to exit): 1 Please enter a column for that cell: 1 Please enter the row of a cell to turn on (or q to exit): 1 Please enter a column for that cell: 2 Please enter the row of a cell to turn on (or q to exit): 2 Please enter a column for that cell: 0 Please enter the row of a cell to turn on (or q to exit): 2 Please enter a column for that cell: 1 Please enter the row of a cell to turn on (or q to exit): q How many iterations should I run? 25 Starting Board: A.............. .AA............ AA............. ............... ............... ............... ............... ............... ............... ............... Iteration 1: .A............. ..A............ AAA............ ............... ............... ............... ............... ............... ............... ............... Iteration 2: ............... A.A............ .AA............ .A............. ............... ............... ............... ............... ............... ............... Iteration 3: ............... ..A............ A.A............ .AA............ ............... ............... ............... ............... ............... ............... Iteration 4: ............... .A............. ..AA........... .AA............ ............... ............... ............... ............... ............... ............... Iteration 5: ............... ..A............ ...A........... .AAA........... ............... ............... ............... ............... ............... ............... Iteration 6: ............... ............... .A.A........... ..AA........... ..A............ ............... ............... ............... ............... ............... Iteration 7: ............... ............... ...A........... .A.A........... ..AA........... ............... ............... ............... ............... ............... Iteration 8: ............... ............... ..A............ ...AA.......... ..AA........... ............... ............... ............... ............... ............... Iteration 9: ............... ............... ...A........... ....A.......... ..AAA.......... ............... ............... ............... ............... ............... Iteration 10: ............... ............... ............... ..A.A.......... ...AA.......... ...A........... ............... ............... ............... ............... Iteration 11: ............... ............... ............... ....A.......... ..A.A.......... ...AA.......... ............... ............... ............... ............... Iteration 12: ............... ............... ............... ...A........... ....AA......... ...AA.......... ............... ............... ............... ............... Iteration 13: ............... ............... ............... ....A.......... .....A......... ...AAA......... ............... ............... ............... ............... Iteration 14: ............... ............... ............... ............... ...A.A......... ....AA......... ....A.......... ............... ............... ............... Iteration 15: ............... ............... ............... ............... .....A......... ...A.A......... ....AA......... ............... ............... ............... Iteration 16: ............... ............... ............... ............... ....A.......... .....AA........ ....AA......... ............... ............... ............... Iteration 17: ............... ............... ............... ............... .....A......... ......A........ ....AAA........ ............... ............... ............... Iteration 18: ............... ............... ............... ............... ............... ....A.A........ .....AA........ .....A......... ............... ............... Iteration 19: ............... ............... ............... ............... ............... ......A........ ....A.A........ .....AA........ ............... ............... Iteration 20: ............... ............... ............... ............... ............... .....A......... ......AA....... .....AA........ ............... ............... Iteration 21: ............... ............... ............... ............... ............... ......A........ .......A....... .....AAA....... ............... ............... Iteration 22: ............... ............... ............... ............... ............... ............... .....A.A....... ......AA....... ......A........ ............... Iteration 23: ............... ............... ............... ............... ............... ............... .......A....... .....A.A....... ......AA....... ............... Iteration 24: ............... ............... ............... ............... ............... ............... ......A........ .......AA...... ......AA....... ............... Iteration 25: ............... ............... ............... ............... ............... ............... .......A....... ........A...... ......AAA...... ............... ############################################################################ # SAMPLE RUN #4: SHOWING AN ALLOWABLE "CRASH" DUE TO BAD "ALIVE" ROW INPUT # ############################################################################ bash-4.1$ bash-4.1$ bash-4.1$ python proj2.py Please enter number of rows: 3 Please enter number of columns: 90 Please enter the row of a cell to turn on (or q to exit): Q Traceback (most recent call last): File "proj2.py", line 159, in main() File "proj2.py", line 180, in main while int(value) < min or int(value) > max: ValueError: invalid literal for int() with base 10: 'Q' ######################################################################## # NEW SAMPLE RUN!!!! # ######################################################################## # SAMPLE RUN #5: SHOWING THAT CELLS CANNOT BE TURNED 'OFF' BY THE USER # ######################################################################## bash-4.1$ python proj2.py Please enter number of rows: 2 Please enter number of columns: 2 Please enter the row of a cell to turn on (or q to exit): 1 Please enter a column for that cell: 1 Please enter the row of a cell to turn on (or q to exit): 1 Please enter a column for that cell: 1 Please enter the row of a cell to turn on (or q to exit): 0 Please enter a column for that cell: 1 Please enter the row of a cell to turn on (or q to exit): q How many iterations should I run? 1 Starting Board: .A .A Iteration 1: .. .. ############################################## # NEW SAMPLE RUN!!!! # ############################################## # SAMPLE RUN #6: RUNNING WITH NO CELLS ALIVE # ############################################## bash-4.1$ python proj2.py Please enter number of rows: 3 Please enter number of columns: 4 Please enter the row of a cell to turn on (or q to exit): q How many iterations should I run? 2 Starting Board: .... .... .... Iteration 1: .... .... .... Iteration 2: .... .... ....