An AI assistant drafted the initials generator below. It runs on a simple name, but the acceptance checks fail.
Your job is the one an engineer actually does with AI-written code: work out what it got wrong, and fix it.
Two behaviours are wrong:
- Names with extra or leading spaces crash the function.
- The initials are not being uppercased.
Press Run to see the checks fail, then fix initials so all of them pass. Keep the function signature unchanged.
You have an AI assistant available. Use it however you normally would - how you direct it and whether you check its answers is part of what we look at.