Lower & upper (2)

The statement is exactly the same as problem X23315: write a function
@lowupp(info)@ that expects to receive a string; if it starts with the
character @’^’@, then it returns the rest of the string in upper case;
if it starts with the character @’_’@, then it returns the rest of the
string in lower case; if it starts anyhow else, it returns the string
unchanged.

The little difference is the following: in case you solved X23315 using
the method @startswith()@ from the class @str@, now you are requested
not to use it, nor any other method from @str@ beyond, of course,
@upper()@, @lower()@, and indexing. Be careful with limit cases!

Sample session

Problem information

Author: José Luis Balcázar

Generation: 2026-01-25T16:55:58.035Z

© Jutge.org, 2006–2026.
https://jutge.org
