Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for Secret Message by _Chico_
def find_message(text):
answer = "" #intial value, it is the result if none of the string elements is a capital
for var in text:
if var.isupper() : #check if given letter is capital
answer += str(var) #append this capital letter to the string
return str(answer)
if __name__ == '__main__':
print("Example:")
print(find_message(('How are you? Eh, ok. Low or Lower? '
+ 'Ohhh.')))
# These "asserts" are used for self-checking and not for an auto-testing
assert find_message(('How are you? Eh, ok. Low or Lower? '
+ 'Ohhh.')) == 'HELLO'
assert find_message('hello world!') == ''
assert find_message('HELLO WORLD!!!') == 'HELLOWORLD'
print("Coding complete? Click 'Check' to earn cool rewards!")
June 5, 2021
Comments: