Reference no: EM132216513
Suppose you work for a company that measures building vibrations using sensors attached to the building.
Over the course of a day, your sensors collect readings periodically.
We are interested in separating the readings into three categories: safe, warning and dangerous.
Your job is to write an algorithm that gets the data and creates three lists of values representing these three categories.
Specifically, your algorithm should do the following:
Get the sensor readings (float values) from the user.
Allow the user to enter values until there is no more data. The user can enter -1 when done.
Store the sensor readings in a list
Ask the user for a threshold for warning readings and a threshold for dangerous readings.
Process the collected data by creating three separate lists to represent the three categories, depending on where the values falls within the thresholds.
Print each list along with a message indicating how many values fall into each category.