← Back to Difficulty Selection
Code Review (Easy): Cleaning Up Dashboard Inputs
Story
Lena started building a helper for the internal dashboard to extract numeric values from messy text labels provided by the engineering teams. Mark reviewed the initial draft and pointed out that the inputs often come with accidental leading spaces or trailing text that could break the display if not handled properly. He asked her to make sure the tool handles positive and negative signs correctly, ignores any zeros at the beginning, and simply caps the number if it exceeds the system's standard capacity. For example, if the tool receives a string like ' -00123units', it should be smart enough to ignore the spaces and the word 'units' to just return -123.
Your Task
Read the story and code, then decide if the code is ready for production or needs improvement.
Hints
What would block an approval? Give me a hint.
Next
Check out Next Topic: The Permission Audit