with paste(to duplicate the cat' face ( dupli-catif you willhere we store the width of height of catim in catimwidth and catimheight at we make copy of catim and store it in catcopytwo now that we have copy that we can paste ontowe start looping to paste faceim onto catcopytwo the outer for loop' left variable starts at and increases by faceimwidth( the inner for loop' top variable start at and increases by faceimheight( these nested for loops produce values for left and top to paste grid of faceim images over the catcopytwo image objectas in figure - to see our nested loops workingwe print left and top after the pasting is completewe save the modified catcopytwo to tiled png resizing an image the resize(method is called on an image object and returns new image object of the specified width and height it accepts two-integer tuple argumentrepresenting the new width and height of the returned image enter the following into the interactive shellfrom pil import image catim image open('zophie png' widthheight catim size quartersizedim catim resize((int(width )int(height ))quartersizedim save('quartersized png' svelteim catim resize((widthheight )svelteim save('svelte png'here we assign the two values in the catim size tuple to the variables width and height using width and height instead of catim size[ and catim size[ makes the rest of the code more readable