Need help on a project To :"Create a class called BankAccount with the following parameters "
lee
malitician at gmail.com
Sun Dec 27 15:26:42 EST 2015
>
> After you've called the function, anything you do to the result is not
> done BY the function and will therefore not be done when called by other
> code.
>
> The unit test that calls the function will not do those things. It
> expects them to already be done.
>
> So ... what changes to your function do you think would fix that?
>
> Regards,
> E.
i modified my code a little but still no luck, the same unit test error surfaced again.
here is the modified code
def manipulate_data(kind, data):
if kind == 'list':
return list(data)[::-1]
elif kind == 'set':
return set(data)
elif kind == 'dictionary':
return dict( data)
manipulate_data("list", range(1,6))
manipulate_data("set", {"a", "b", "c", "d", "e", "ANDELA", "TIA", "AFRICA"})
manipulate_data("dictionary", {"apples": 23, "oranges": 15, "mangoes": 3, "grapes": 45}).keys()
More information about the Python-list
mailing list