Develop an algorithm, using either pseudo-code or a flowchart, that helps a drone delivery service estimate the number of deliveries they are likely to complete on a particular day.
Your algorithm should:
- get the user to enter whether the weather is 'Rainy' or 'Dry'
- get the user to enter the forecast temperature in °C (they should enter a number between -5 and 35 inclusive; if the number falls outside of this range then they should be made to re-enter another number until they enter a valid temperature)
- calculate the base number of deliveries likely to be made using the following rules:
- 50 deliveries are likely if the temperature is between -5 and 10 °C inclusive,
- 100 deliveries are likely if the temperature is between 11 and 25 °C inclusive,
- and 70 deliveries are likely if the temperature is higher than 25 °C
- reduce the estimated deliveries by 20% (multiply by 0.8) if the weather is 'Rainy'
- output the final estimated number of deliveries.