Question: Answer these Reflective Questions As fast as possible Below is my code that I have used Which functions did you use a nested structure (nested

Answer these Reflective Questions As fast as possible

Below is my code that I have used

Which functions did you use a nested structure (nested loops, nested conditionals, etc) to implement the requirements? Would it have been possible to implement them without using a nested structure? Which functions did you not use a nested structure? Would it have been possible to implement them with a nested structure?

Suppose we wanted to create an additional map classification called 'Urban City' which is indicated by the number of 'R' cells plus the number of 'C' cells being between 60% and 80%. Can we do this? How might this affect our classify_map() function?

How many test cases would you need to confirm that your classify_map() function correctly identifies a "Farmland" map? Explain what your test cases would be.

Answer these Reflective Questions As fast as possible Below is my codethat I have used Which functions did you use a nested structure

(nested loops, nested conditionals, etc) to implement the requirements? Would it have

main.py Returns: (string) : A map classification according to rules. \#Get total number of cells in the map variable - rows * columns totalcells = len (mapdata)1en(mapdata[]) \#Check if no of R cels is greater than 50% of all cells If( countType(map_data, ' R)>(0.5 totalcells)): return "Suburban" \#Check if no of A cels is greater than 50% of all cells elif (countType (map_data, ' A)>(0.5totalcells) ): return "Farmland" \#Hheck if no of U cels and W cells are greater than 50\% of all cells elif ((countType(map_data, 'U')+countType(map_data, 'W'))>(0.5*totalcells)): return "Conservation" \#Check if no of C cels is greater than 50% of all cells elif (countType (map_data, 'C') >(0.5 totalcells)): \#If greater; check if no of U cells and A cells between 10 to 20 percent UA= countType (map_data, 'U')+countType(map_data, 'A') if (UA>=10 and UA

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!