(5/5)

In this project, we will make a game sudoku for kids. Sudoku is a board game that is played on a grid, so we’ll use a Cartesian coordinate system with XY coordinates.

INSTRUCTIONS TO CANDIDATES

In this project, we will make a game sudoku for kids. Sudoku is a board game that is played on a grid, so we’ll use a Cartesian coordinate system with XY coordinates.

The description of the sudoku below can be different from a traditional sudoku. Please only follow the instruction below for this project:

Our sudoku has a 4x4 board and the stones ‘A’, ‘B’, ‘C’ and ‘D’ will be used.

1. Rule description

Our kids sudoku is played on a grid of 4 x 4 spaces. Within the rows and columns are 4 “squares” (made up of 2 x 2 spaces). Each row, column and square (4 spaces each) needs to be filled out with the alphabet letters ‘A’ to ‘D’, without repeating any letters within the row, column or square.

1.1 Horizontal Rule : There should be no repeat of the same letters horizontally – e.g.)

1 2 3 4

+-+-+-+-+

1 |B B|C |  Horizontal Rule violated

2 |D | |

+-+-+-+-+

3 | | A|

4 | D| |

+-+-+-+-+

1.2. Vertical Rule: There should be no repeat of the same letters vertically – e.g.)

1 2 3 4

+-+-+-+-+

1 |B |C |

2 |D |C |  Vertical Rule violated

+-+-+-+-+

3 | | A|

4 | D| |

+-+-+-+-+

1.3. Square rule : There should be no repeat of the same letters in the square – e.g.)

1 2 3 4

+-+-+-+-+

1 |B |C |

2 |D | |

+-+-+-+-+

3 | | A|

4 | D|A | Square Rule violated

+-+-+-+-+

2. Executing Python program

2.1. Your program name will be sudoku.py. If you execute ‘python sudoku.py’ (or python3 sudoku.py), then

(1) your program ‘sudoku.py’ will get the input of a 2-d board (4x4) from a user, and then (2) display the 4x4 board.

Following is an example: (letters in blue are input from the user.)

Miyoungs-MacBook-Pro:AUCSC111 \$ python sudoku.py

Enter your 2-d board (4x4): [['B', ' ', 'C', ' ' ], ['D', ' ', ' ', '

' ], [' ',' ',' ','A' ], [' ', 'D', ' ', ' ' ]]

2.2. Then,

(3) Your program asks the user to enter a row number, a column number, and a letter that the user wants to write in the corresponding cell.

(4) Then your program will put the letter in the cell corresponding to the row and column numbers, and then

(5) display the changed board.

(6) The newly added letter will be displayed in a different color (choose color on your own. How to make a color letter is explained later.) In this example, I choose the green color.

(7) After that, your program will keep asking the user to enter a row number, a column number, and a letter, as shown below.

1 2 3 4

Type a row number, a column number, and a letter (e.g., 1 2 A): 3 3 D

1 2 3 4

Type a row number, a column number, and a letter (e.g., 1 2 A):

2.3

(8) If all blanks are filled in successfully, then you will show a congratulations message, as shown below, and then terminate the game.

….(intermediate process omitted)……

Type a row number, a column number, and a letter (e.g., 1 2 A): 4 4 C

1 2 3 4

==============================================

You solved this Sudoku! Congratulations!!!!

==============================================

<Then, the program will be terminated.> 2.4.

(8) In case that the user enters a letter which violates the sudoku rule, you display the error

message that explains the error type (e.g. horizontal rule, vertical rule, and square rule), and

(9) keep asking the user to enter a row number, a column number, and a letter.

(5/5)

Related Questions

. Introgramming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma

. The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

. Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

. SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

. Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

Hire Me

Hire Me
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}