Write the following Python program in a python class named Assignment6.py and upload the file to Blackboard when the assignment is complete. The goal of this program is to take a collection of rectangles and display them on a canvas so that none of the rectangles overlaps with each other. To accomplish this task, your program will define several methods and classes. Note: parameters and return values must be in the order they are listed in the assignment manual. The main function will read in a file path as a command line argument. You may assume the file path is always the second command line argument given (the first being the name of the class being executed) The given file path will point to a text file containing a canvas size and rectangles. The first line of the given text file will contain two ints’s separated by a comma. View Less >>
import tkinter from tkinter import Canvas import sys from operator import attrgetter from textwrap import fill top = tkinter.Tk()   cc.master.create_rectangle( allRect1[i].x,allRect1[i].y, allRect1[i].x+allRect1[i].width, allRect1[i].y+allRect1[i].height) #Pack the canvas cc.master.pack() #show the canvas cc.master.mainloop() if __name__ == ‘__main__’: main() Get solution

Place a new order
Pages (550 words)
Approximate price: -