id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

plural


Given a singular noun, return the plural form. For many nouns, the rule is just "add s". But there are some other rules, and some exceptions. For many words that end in a "z"-like sound (s, z, ch or sh), or for words ending in "o", the rule is to "add es". For many words ending in "y" preceded by a consonant, the rule is "remove the y and add ies". There are also some words that are exceptions, like deer/deer, child/children, goose/geese, and so on. Write a function plural(word) that handles most of these. (This is an open-ended problem. You can stop when all the test pass, but you won't really be done then. You can assume words are lowercase.)


plural('cat') → 'cats'
plural('memory') → 'memories'
plural('cherry') → 'cherries'

...Save, Compile, Run (ctrl-enter)

def plural(word):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Difficulty: 300 Post-solution available

Copyright Nick Parlante 2017 - privacy