Soil Moisture Sensor Grid Average
Soil Moisture Sensor Grid Average
EasyArrays58% accepted
Punjab farmer Ravi uses 8 soil moisture sensors across his wheat field. Sensors send moisture percentage readings. Calculate the average moisture level (sum of readings divided by the number of sensors) to decide irrigation timing and water pump scheduling. Use float division — not integer division — and round the result to 2 decimal places.
Approach
Given array of 8 soil moisture readings (0-100%), calculate the average moisture level, rounded to 2 decimal places (use float division, not integer division).
Input
19
11 47 94 72 9 53 50 100 45 42 81 86 11 56 18 100 71 49 32
Output
54.05
More Arrays problems
Browse all coding problems →solution.py
Loading editor...
Test 1
Test 2
Test 3
Press Run to test your custom input, or Submit to judge against all test cases.
Sign in to continue
Create a free account to run code, submit solutions and track progress.
- Free forever — no credit card
- 10+ languages with live execution
- Points, streaks & leaderboards