IMD Weather Code to Text Translator
IMD Weather Code to Text Translator
EasyStrings0% accepted
India Meteorological Department (IMD) monitoring station in Delhi uses weather code abbreviations: 'CL' for Clear, 'PC' for Partly Cloudy, 'OC' for Overcast, 'RA' for Rain, 'ST' for Thunderstorm. Arjun needs to translate and count rainy/stormy periods in a day's weather sequence.
Approach
Given a comma-separated string of weather codes (CL, PC, OC, RA, ST), translate each to its full name and return the translated sequence. Also return the count of rainy (RA+ST) periods in format 'Translation|RainyCount'.
Input
CL,PC,RA,ST,CL
Output
Clear,Partly Cloudy,Rain,Thunderstorm,Clear|2
More Strings 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