Computational Thinking
159.271 Computational Thinking
Assignment 1: Sudoku Solver
This assignment is worth 15% of your final mark. It will be marked out of a total of 20 marks. The
due date for this assignment is Monday April 26th 11:55pm China time. You are expected to work
on this assignment individually and all work that you hand in is expected to be your own work.
In this assignment your task is to write a Sudoku solver. You will develop an animated application
that uses recursive backtracking as the basis of the implementation. I'm going to assume that you
know how to solve Sudoku already, since, if not, then you must have been hiding under a rock for
the past 10 years!
Assignment1 code template
This folder contains a template program that implements the code needed to read Sudoku puzzles
from files and to display them, and to run the solver in animation mode. Set up a new project in
your IDE and add the folder src to it. The main game module is SudokuApp.py. If you run this, a
screen will appear and clicking on either the 'e' or the 'h' key will display a randomly chosen
puzzle (either easy or hard) from one of the two folders of puzzles included.
You need to complete the module Solver.py, so that a call to the solve function will do a bit
more than just displaying the puzzle. You need to turn this function into a recursive backtracking
solver, which, for animation purposes, displays a snapshot of the current state of the puzzle at the
start of each recursive call.
版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。