Join Barron Stone for an in-depth discussion in this video Solution Overview, part of Code Clinic: Python.
In this video I'll give you a brief overview…of my solution to the eight queens problem…by demonstrating the user interface…and describing the approach I took.…Now the name eight queens is a bit misleading…because the program is actually able to solve…the queens problem for any number…of four or more queens.…So, I decided to call my program "N Queens" instead.…If you open up the exercise files,…and navigate to the problem three directory…you'll find a script in there called "nqueens.py".…When you run the N Queens script it'll display…a standard sized eight by eight chessboard…with one possible solution to the eight queens problem.…
The solution counter in the bottom right…tells me that this is the first of 92 possible solutions…for an eight by eight queens board.…To view other possible solutions,…just click on the "Get Next Solution" button,…and the program will cycle through…and display all possible solutions.…You can also calculate the solution to the queens problem…for a different number of queens,…and to do that just change the value…
Barron introduce challenges and provides an overview of his solutions in Python. Challenges include topics such as statistical analysis, searching directories for images, and accessing peripheral devices.
Visit other courses in the series to see how to solve the exact same challenges in languages like C#, C++, Java, PHP, and Ruby.
Skill Level Intermediate
Q: Why can't I access the Lake Pend Orielle site (http://lpo.dt.navy.mil)?
A: The Lake Pend Orielle site is not accessible in some geographical areas. We have contacted the owner of the server to try to resolve this issue.
Q: I am unable to access the Lake Pend Oreille data from outside the U.S.
A: A static copy of this data is provided here for lynda.com members outside of the U.S
Problem One: Exploring Lake Pend Oreille
Problem Two: Image Analysis
Problem Three: Eight Queens
Problem Four: Accessing Peripherals
Problem Five: Recursion and Directories
Problem Six: Building the Web
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.