August 2020
Beginner
440 pages
12h 2m
English
|
I grew up in the American Deep South where we tend to drop the final “g” of words ending in “ing,” like “cookin’” instead of “cooking.” We also tend to say “y’all” for the second-person plural pronoun, which makes sense because Standard English is missing a distinctive word for this. In this exercise, we’ll write a program called friar.py that will accept some input as a single positional argument and transform the text by replacing the final “g” with an apostrophe (’) for two-syllable words ending in “ing” and changing “you” to “y’all.” Granted, we have no way to know if we’re changing the first- or second-person “you,” but it makes for a fun challenge nonetheless. |
Figure 15.1 is a string ...
Read now
Unlock full access