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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started