Question: Creates a function called rainAnalyzer that has the string data as a parameter. The string in data contains all the data collected by a rain

Creates a function called rainAnalyzer that has the string data as a parameter. The string in data contains all the data collected by a rain sensor. For each rain event, data records how much it rained in Inch. Observations are separated using the comma symbol ",". For example if data is set to "1.2,5.3,1.0", this means that data contains information from three rain events where 1.2 inches of rain, 5.3 inches of rain and 1.0 inch of rain were observed The function must return: a. (5 points) how many rain events were recorded in the string data b. (5 points) the average amount of rainfall recorded (in the example above, the average amount of rain (1.2+5.3+1.0)/3 )

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!