Lower & upper P74495


Statement
 

pdf   zip

html

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.

Scoring

The function counts 100 points

Sample session
>>> lowupp("_Hi There!")
hi there!
>>> lowupp("^Hi There!")
HI THERE!
>>> lowupp("Hi There!")
Hi There!
Information
Author
José Luis Balcázar
Language
English
Official solutions
Python
User solutions
Python