Question
Modify the map-mapking program from Lab 4 to create a topographic map (highlighting the points that have elevations that are multiples of 10). Your program
Modify the map-mapking program from Lab 4 to create a topographic map (highlighting the points that have elevations that are multiples of 10). Your program should ask the user for the amount of blue (a floating point number between 0.0 and 1.0), the name of the output image, create a new image with that name and with the pixels colored as follows: o If the elevation is less than or equal to -10 (deep below sea level), color the pixel dark gray (20% red, 20% green, 20% blue). o If the elevation is less than or equal to 0 (below sea level but not so deep), color the pixel the amount blue the user specified (and 0% red and 0% green). If the elevation is divisible by 10, color the pixel black (0% red, 0% green, and 0% blue). Otherwise, the pixel should be colored white (100% red, 100% green, and 100% blue). A sample run of your program should look like: Erow blue is the ocean: 0.5 What is the output file: medBlue.png Thank you for using my program! Your map is stored medBlue.png. Your resulting map should look like: and be saved to a file called medBlue.png. Note: before submitting your program for grading, remove the commands that show the image (i.c. the ones that pop up the graphics window with the image). The program is graded on a server on the cloud and does not have a graphics window, so, the plt.show() and plt.imshow ( ) commands will give an error. Instead, the files your program produces are compared pixel-by-pixel to the answer to check for correctness.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started