CS 1371 Lecture Notes - Lecture 6: Linear Algebra, Seed, Binary Logarithm

107 views5 pages

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;

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents