title: Python 3.4 endswith()
body: <p>I'm not exactly a Python 3.x pro but I was finding stuff to do on Python 3.x and I found this:</p>
  
  <p>The third person singular verb form in English is distinguished by the suffix -s, which is added to the stem of the infinitive form: run -> runs. A simple set of rules can be given as follows:</p>
  
  <p>a. If the verb ends in y, remove it and add ies</p>
  
  <p>b. If the verb ends in o, ch, s, sh, x or z, add es</p>
  
  <p>c. By default just add s</p>
  
  <p>Your task in this exercise is to define a function make_3sg_form() which given a verb in infinitive form returns its third person singular form. Test your function with words like try, brush, run and fix. Note however that the rules must be regarded as heuristic, in the sense that you must not expect them to work for all cases. Tip: Check out the string method endswith()</p>
  
  <p>So I created a code fore it but there is a problem, heres the code:</p>
  
  <pre><code>def make_3sg_form():
      Word = input('Enter a word: ')
      if Word.endswith('y'):
          New_word=Word[:+4]+'ies'
          print(New_word)
      if Word.endswith(('o', 'ch', 's', 'sh', 'x' or 'z')):
          New_word=Word[:+4]+'es'
          print(New_word)
      if Word !=Word.endswith((('o', 'ch', 'y', 's', 'sh', 'x' or 'z'))):
          New_word=Word[:+10]+'s'
          print(New_word)
  make_3sg_form()
  </code></pre>
  
  <p>The problem is is if I do a word ending in 'y'  ie lorry
  It will output</p>
  
  <pre><code>lorries
  lorrys
  </code></pre>
  
  <p>Also how do I make it so the number in the code is the number of letters in the word minus 1 (just so I don't have to change the number based on the word.</p>