CSc 2010
Lab Assignment 6
Due: 18 April, 2010

This is an individual assignment that does not involve the robot.

Write a Python program, called Jigsaw.py, that works as follows:

  1. The program begins by displaying the following picture in a window labeled "Original Picture".
    The jpg image is 720x480 in size.
  2. Then, the program cuts the image into 6 pieces, each 240x240 in size, and scrambles the six pieces randomly and displays the scrambled image in a separate window labeled "Scrambled Image". A sample scrambled image is shown below:
  3. Then, the program continually prompts the user for two cell numbers (each cell number ranges from 1 to 6; where cells 1, 2 , and 3 correspond to the 3 images in the first row and cells 4, 5, and 6 correspond to the 3 images in the second row).
    Cell number (1-6) to exchange: 1
    Cell number (1-6) to exchange: 2
    
    If the first cell number entered by the user is 0, the program stops. Otherwise, the program exchanges the the two images at the two cells and displays the altered image in a window labeled "Exchanged Picture".

Email your Jigsaw.py to raj@cs.gsu.edu by 11:59 p.m. on the assigned date.