On 27/12/15 20:32, Prince Udoka wrote:
thanks mr cameron simpson, finally at i got the solution, God bless you: def manipulate_data(kind, data): if kind == 'list': for data in [1, 2, 3, 4, 5]: return data.reverse() elif kind == 'set': for data in {"a", "b", "c", "d", "e"}: data.add("ANDELA") data.add("TIA") data.add("AFRICA") return data elif kind == 'dictionary': for data in {"apples": 23, "oranges": 15, "mangoes": 3, "grape": 45}: return data.key()
Please stop posting code to the list which you have not even attempted to run. This is getting a bit silly.
RUN your code. Three of the four paths through that code will fail when it is run, so I am sure that you have not.
If you don't understand the error messages then ask what they mean, along with your guess at what you think they mean and what you tried to do about it (but did not work).
Please consider joining a list which is more appropriate for these questions:
https://mail.python.org/mailman/listinfo/tutor/ E. -- https://mail.python.org/mailman/listinfo/python-list