CSC108H Exercise 2

Due Date: 2012-06-14 23:55

In a file called e2.py, write the following functions.

Function name:
(Parameter types) -> Return type
Description
remove_vowels:
(str) -> str
Return a new str that is identical to the input str except that the vowels have been removed. Vowels are the letters a,e,i,o,u. We do not consider y a vowel.
convert_to_upper:
(list of strs) -> NoneType
Convert the strs in the given list to uppercase.
get_x_strs:
(list) -> list of strs
Given a list l, return a new list that contains only the elements of l that are strs that contain the character 'x'. Do not alter l.

Content of e2.py: Your e2.py file should contain the function definitions specified above. The file may also include test code, but any test code should be entirely within the main block and not anywhere else in e2.py.

Pre-marking: We will "pre-mark" the exercise by getting your most recent submission from the online submission system (MarkUs), running our tests on it, and giving you the results (in a file called test_e2.out on MarkUs). This will be done at least 4 times a day. You may resubmit as often as you like; the version in MarkUs at the deadline is what your exercise mark is based on.

What To Hand in: Submit e2.py, according to the instructions on the course website. Remember that spelling of filenames and function names, including case, counts: your files and functions must be named exactly as specified above. Remember also that your submission will be marked on CDF, so you should make sure it works on CDF.