Validate Ration Shop Customer Card ID
Validate Ration Shop Customer Card ID
EasyStrings0% accepted
Meera manages ration allocation in Delhi. Each customer receives a card ID following the pattern: 3-letter city code + 4-digit card number + 1-letter verification character (e.g., DEL1234A). Validate if the given ID matches this format.
Approach
Given a ration card ID, validate if it matches the exact format: 3 uppercase letters, 4 digits, 1 uppercase letter.
Input
DEL1234A
Output
Valid
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