Your question is String Capitalization Without Built-ins. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Barracuda Networks security tooling may need to normalize or toggle text without relying on convenience APIs. Implement a function that changes the capitalization of ASCII letters in a string without using native Python functions or string methods such as upper(), lower(), swapcase(), ord(), chr(), len(), range(), or str.translate().
The mode argument is one of "upper", "lower", or "toggle". Convert only the 52 English alphabetic characters. Preserve digits, whitespace, punctuation, symbols, and all character ordering. The input is guaranteed to contain only ASCII characters.
text, a string of ASCII characters, and mode, one of the three permitted mode strings.def transform_case(text, mode):