Question: 4 (**). Write a program to create and solve Sudoku puzzles. The program should allow the user to: Enter a Sudoku interactively from the keyboard

 4 (**). Write a program to create and solve Sudoku puzzles.The program should allow the user to: Enter a Sudoku interactively from

4 (**). Write a program to create and solve Sudoku puzzles. The program should allow the user to: Enter a Sudoku interactively from the keyboard Load a Sudoku from a text file. Randomly generate and solve a Sudoku For each of the cases above check for multiple or no solutions and invalid inputs. Print the generated and solved solutions (only 2 if applicable) to the screen in the same format as shown below. Finally, the program should ask if the user wants to run the program again (Check case). Let the user input the file name from the keyboard. Use functions/methods as appropriate. Do not use recursion. The professor will provide code for you modify. Refer to the sample output below. Sample Run: Do you wish to? 1. Enter a Sudoku from the keyboard. 2. Load a Sudoku from a data file. 3. Randomly generate and solve a Sudoku. >> 3 Generated Sudoku: +- | 5 3 7 6 | 1 95 | 98 | | 6 m | 8 | 4 | 7 6 8 2 31 | 3 1| 6 | 6 | 1 | 4 1 9 | 8 | 5 791 + Sample solution 1: Solution 1: +----- - + | 5 3 2 6 7 8 9 14 | 1 674 | 195 | 328i | 198 34 2 5 67 | -+ -+-------+ | 819 | 7 64 | 25 3 | | 4 2 6 8 5 3 | 791| | 7 5 3 9 2 1 | 4 8 6 | -+-------+ | 961 | 537 8 4 2 | | 2 8 7 4 19 6 3 5 | | 3 4 5 | 286 | 179 | -+ Solution 2: | 532 | 6 7 8 9 14 | | 6 7 4 | 195 328 | | 19 8 3 4 2 5 6 7 | 819 7 6 4 2 5 3 | | 4 2 6 8 5 3 | 7 91 | | 7 5 3 9 21 | 8 4 6 | | 961 | 5 3 7 4 8 2 | 287 4 19 635 | | 3 4 5 | 286 | 179 | There are 18 solutions Run Again (Y/N)? y 4 (**). Write a program to create and solve Sudoku puzzles. The program should allow the user to: Enter a Sudoku interactively from the keyboard Load a Sudoku from a text file. Randomly generate and solve a Sudoku For each of the cases above check for multiple or no solutions and invalid inputs. Print the generated and solved solutions (only 2 if applicable) to the screen in the same format as shown below. Finally, the program should ask if the user wants to run the program again (Check case). Let the user input the file name from the keyboard. Use functions/methods as appropriate. Do not use recursion. The professor will provide code for you modify. Refer to the sample output below. Sample Run: Do you wish to? 1. Enter a Sudoku from the keyboard. 2. Load a Sudoku from a data file. 3. Randomly generate and solve a Sudoku. >> 3 Generated Sudoku: +- | 5 3 7 6 | 1 95 | 98 | | 6 m | 8 | 4 | 7 6 8 2 31 | 3 1| 6 | 6 | 1 | 4 1 9 | 8 | 5 791 + Sample solution 1: Solution 1: +----- - + | 5 3 2 6 7 8 9 14 | 1 674 | 195 | 328i | 198 34 2 5 67 | -+ -+-------+ | 819 | 7 64 | 25 3 | | 4 2 6 8 5 3 | 791| | 7 5 3 9 2 1 | 4 8 6 | -+-------+ | 961 | 537 8 4 2 | | 2 8 7 4 19 6 3 5 | | 3 4 5 | 286 | 179 | -+ Solution 2: | 532 | 6 7 8 9 14 | | 6 7 4 | 195 328 | | 19 8 3 4 2 5 6 7 | 819 7 6 4 2 5 3 | | 4 2 6 8 5 3 | 7 91 | | 7 5 3 9 21 | 8 4 6 | | 961 | 5 3 7 4 8 2 | 287 4 19 635 | | 3 4 5 | 286 | 179 | There are 18 solutions Run Again (Y/N)? y

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!