This assignment is designed to practice and assess your capabilities to solve complex algorithmic problems with Python AND your ability to verbally explain your solution. It is an individual assignment meaning that you are supposed to solve it alone during your self-study time and are not allowed to share or copy your solution or any part of it.
The above implies that you are not allowed to post any of your code to any forum (including Ed). However, please do use Ed to clarify task requirements and to discuss other assignment-related questions that do not disclose parts of your solution. If you feel stuck and believe you really need more specific help, please approach your tutors. They won’t solve the problems for you (and especially not debug your code) but can provide you with general feedback and tell you if you are on the right track. While parts of the assignment might be challenging, we hope that completing it will be a fruitful and engaging learning experience for you.
Sudoku is a puzzle game for one player where one has to fill up a regular grid of fields (game board) with numbers. Typically a Sudoku board is 9 times 9 fields, but in this assignment we will write functions that can work in principle with arbitrary sized n times n boards as long as n = k**2 for some integer k > 1 (although for k > 2 some functions in Part II may be too slow to use in practice).
Conceptually, the board is composed of kk subgrids (each consisting of kk fields). The objective of the player is to fill all fields with the numbers 1 to n (inclusive) such that
• no column of the grid contains the same number more than once
• now row of the grid contains the same number more than once
• none of the k**2 subgrids contains the same number more than once
See https://en.wikipedia.org/wiki/Sudoku for more information.
In this assignment, we represent a Sudoku board by a nn table where each entry is either a number from 1 to n (inclusive) or 0 representing that the corresponding field is still empty. For example, a small game board with n=4 (and k=2) with four fields already filled could be defined as follows:
EasyDue™ 支持PayPal, AliPay, WechatPay, Taobao等各种付款方式!
E-mail: email@example.com 微信:easydue