********** Spongecase ********** .. tags:: tiny, beginner, word You’ve probably seen the “Mocking SpongeBob” meme: a picture of SpongeBob SquarePants, with a caption whose text alternates between upper- and lowercase letters to indicate sarcasm, like this: uSiNg SpOnGeBoB MeMeS dOeS NoT mAkE YoU wItTy. For some randomness, the text sometimes doesn’t alternate capitalization. This short program uses the upper() and lower() string methods to convert your message into “spongecase.” The program is also set up so that other programs can import it as a module with import spongecase and then call the spongecase.englishToSpongecase() function. .. collapse:: spongecase.py .. literalinclude:: spongecase.py :language: python :linenos: https://inventwithpython.com/bigbookpython/project72html