Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

User In this assignment you are required to develop software ( a set of functions ) that can be used to investigate plant diversity in

User
In this assignment you are required to develop software (a set of functions) that can be used to investigate plant diversity in a particular area. Environmental scientists may be required to identify all the different species and their prevalence in several sample zones within a larger area to establish estimates of that areas biodiversity. The scientists establish ten randomly placed quadrats (10m x 10m zones) within the area and create a full record of all the plants within each quadrat. To speed up this process, the intent is to allow the scientists to photograph each individual specimen, have the specimen identified automatically using AI-based plant identification software, and add the name of the identified specimen to a list for further analysis.
Task 1. Establish and populate a species list For this task, you are required to create a list and populate it with items representing each of the plants within a quadrat. Given the software is in the initial development stages, the list data will be test data that you manually create rather than provided via AI detection. You may choose whatever plant species names you wish for your test data, however the data must contain: 1) A minimum of 20 entries (which may include duplicate items to reflect where there are multiple specimens of a single plant species)2) At least 5 different plant species In your program you may define other (auxiliary) functions with arbitrary names, however the primary function that provides the solution for this task must be named quadratCreation(). You must also document your algorithm / pseudocode for your solution.
Task 2. Data Corrections In this task you are required to provide a way for the scientists to update the name of a specimen when the AI detection software has incorrectly labelled a plant. This requires two functions: specimenCorrection(index, name) which changes the name of the specimen at the specified index to the specified name. For example, specimenCorrection(3,Acacia longifolia) needs to change the item at index 3 of the list to be Acacia longifolia speciesCorrection(current, new) which changes the name of every specimen with the current name to the new name. For example, speciesCorrection(Koromiko,Veronica albicans) needs to replace every list entry that stores Koromiko to store Veronica albicans. In your program you may define other (auxiliary) functions with arbitrary names, however, the solution functions of this task should be named specimenCorrection(index, name) and speciesCorrection(current, new). You must also document your algorithm / pseudocode for your solution.
Task 3. Function speciesCounts(). In this task you are required to write a Python function that provides counts of each species. This requires one function, speciesCounts(), that counts each unique plant species and returns the species name with its total prevalence count. For example, for a list containing the following items (note that these examples are not plant species but these must be plant species in your list): [A,A,C,B,C,C,F,G, A,B, G,B,E,E, A,C,D,A,B,G] the output of speciesCounts() would contain: Species Counts A 5 C 4 B 4 F 1 G 3 E 2 D 1 You may choose to modify the order in which the plants are listed, and the appearance of how the results are presented, but each unique species and its total count must be displayed. In your program you may define other (auxiliary) functions with arbitrary names, however, the solution function of this task should be named speciesCounts(). You must also document your algorithm / pseudocode for your solution.
Task 4. Function main(). In this task you are required to write a function main() where you test your functions. The output should include: 1) A printout of all the items in your list after you have populated it in Task 1 using quadratCreation().2) A demonstration of using specimenCorrection(index, name) to change the name of a recorded specimen in Task 2. This needs to change the 5th specimen in your list, and print the name of the specimen directly from your list after the change has been processed. 3) A demonstration of using speciesCorrection(current, new) to change the name of a recorded species in Task 2. This needs to change all instances of any species which occurs multiple times in your list, and print the full list after the change has been processed. 4) A demonstration of speciesCounts() as implemented for Task 3.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What are the different categories of financial instruments?

Answered: 1 week ago

Question

discuss the reliability of the data you have gathered;

Answered: 1 week ago

Question

undertake an initial analysis of your data;

Answered: 1 week ago