Question: PROBLEM 2: Crazy Gravity Function Name: gravity Parameters: filename1 - the name of the background image, filename2 - the name of the image flipped vertically

PROBLEM 2: Crazy Gravity Function Name: gravity Parameters: filename1 - the name of the background image, filename2 - the name of the image flipped vertically and then superimposed on the background filename3 - the name of the image flipped horizontally and then superimposed on the background top - the y coordinate along which the tops of both superimposed images should be aligned side - the x coordinate of the starting location where the filename 2 is superimposed on the background image Return value: picture - the modified picture Description: I am on a planet that is just like Earth but for some reason the gravity is completely wacky and goes in all sorts of different directions. Write a function that will take in three images, the first of which is a background image and then superimpose the other two images onto the background image. In addition, the function takes in a top and side value. The second image's top left corner should be placed at x = side, y = top in the background image and be vertically flipped. The third image should be top pixels from the top of the background, side pixels from the right edge of the background, and be flipped horizontally before being superimposed onto the background image. The background image should then be returned. Test Cases: >>> show (gravity ("beach2.jpg", "buzz.jpg", "butterfly.jpg",20,20)) >>> show (gravity ("jungle.jpg", "robot.jpg","licon-penguin.png", 40,30)) PROBLEM 2: Crazy Gravity Function Name: gravity Parameters: filename1 - the name of the background image, filename2 - the name of the image flipped vertically and then superimposed on the background filename3 - the name of the image flipped horizontally and then superimposed on the background top - the y coordinate along which the tops of both superimposed images should be aligned side - the x coordinate of the starting location where the filename 2 is superimposed on the background image Return value: picture - the modified picture Description: I am on a planet that is just like Earth but for some reason the gravity is completely wacky and goes in all sorts of different directions. Write a function that will take in three images, the first of which is a background image and then superimpose the other two images onto the background image. In addition, the function takes in a top and side value. The second image's top left corner should be placed at x = side, y = top in the background image and be vertically flipped. The third image should be top pixels from the top of the background, side pixels from the right edge of the background, and be flipped horizontally before being superimposed onto the background image. The background image should then be returned. Test Cases: >>> show (gravity ("beach2.jpg", "buzz.jpg", "butterfly.jpg",20,20)) >>> show (gravity ("jungle.jpg", "robot.jpg","licon-penguin.png", 40,30))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
