⌘K
Flycodx

Farm Soil Moisture Level Classification

Farm Soil Moisture Level Classification

MediumArrays50% accepted

Arjun's smart farm in Punjab has 10 soil moisture sensors in different zones. Each sensor reads moisture percentage. He categorizes zones as dry (<30%), optimal (30-70%), or wet (>70%) to decide which areas need irrigation.

Approach

Given an array of soil moisture percentages, count sensors in each category: dry (<30%), optimal (30-70%), wet (>70%).

Input

10 25 35 45 75 20 50 65 15 40 80

Output

[3, 5, 2]
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
Auto Save OnLn 1, Col 1Spaces: 4UTF-8LFPython 3