PYTHON: Write a function called keepShouting. This function does
not need any input parameters. The function should simply repeat
whatever the user enters but in all capitals!
The function should ask the user to enter a phrase. The phrase then
should be capitalized and printed to the screen.
If the user just hits return (which will produce the empty string)
then the program should stop.
Hint: Use a while loop and string methods
# keepShouting() """ The function call should be able to produce the following result: Enter a phrase (return to quit): help HELP Enter a phrase (return to quit): I am whispering I AM WHISPERING Enter a phrase (return to quit): all done ALL DONE Enter a phrase (return to quit): """
def keepShouting(): s = input("Enter a phrase (return to quit): ") while s: print(s.upper()) s = input("Enter a phrase (return to quit): ") # Testing keepShouting()
Get Answers For Free
Most questions answered within 1 hours.