-ing It!

The questions below are due on Thursday June 17, 2021; 11:00:00 AM.
 
You are not logged in.

Please Log In for full access to the web site.
Note that this link will take you to an external site (https://shimmer.mit.edu) to authenticate, and then you will be redirected back to this page.

Write a program which adds 'ing' to all of the strings in a list of strings.

The first line of your program should set up a variable l to hold the input list, which you can assume contains only strings. For example:

l = ["eat", "sleep", "code"]

Your program should print the resulting list. For example, it would print the following list for the example:

["eating", "sleeping", "codeing"]

You may upload your file for testing:

  No file selected

An Extension

Now, cut off the trailing 'e's of strings that have them, before adding 'ing'. For example, for

l = ["eat", "sleep", "code"]

you would now print

["eating", "sleeping", "coding"]

where 'coding' has no 'e'. If there are multiple trail 'e's, just cut off the last one.

This extension can be challenging!

  No file selected