Validate School Grade Report String
Validate School Grade Report String
EasyStrings0% accepted
Meera teaches at Delhi Public School and validates student grade strings like 'A-B-A-C-B' where each grade must be A through F, separated by hyphens.
Approach
Check if a hyphen-separated string contains only valid grades (A through F) with no invalid characters or empty segments.
Input
A-B-A-C-B
Output
true
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