CS 1371 Lecture Notes - Lecture 6: Linear Algebra, Seed, Binary Logarithm
Document Summary
Inputs (1): - (double) an array of numbers representing vegetation. Outputs (1): - (char) percentage of area covered by trees. You, a professional environmental engineer, are given an array representing a vegetation map of wyoming. Each million acres of land is represented by one element in the array. Your job is to determine what percentage of the state is covered with a high tree density: this corresponds to a value of 8 or greater on the vegetation map array. Write a function called deforestation which takes in this array and outputs the percentage of the area that is covered by a high tree density. The answer must be expressed as a percentage, out of 100, and it must be represented as a string, of a decimal rounded to the hundredth place. Test case: array = [5, 6, 8, 2, 8, 4, 9, 11;