Nov-27-2018, 04:41 PM
Hi,
My code seems running fine on jupyter notebook,
but when pasted into the Module 2 Required Code Submission gived me error ...
Any hint ?
My code seems running fine on jupyter notebook,
but when pasted into the Module 2 Required Code Submission gived me error ...

Any hint ?

# [] create list-o-matic # [] copy and paste in edX assignment page zoo = ['cat', 'goat', 'cat'] def list_o_matic(animal): if animal == "": animal = zoo.pop() print(animal + " popped from list") elif animal in zoo: zoo.remove(animal) print("1 instance of " + animal + " removed from list") else: zoo.append(animal) print("1 instance of " + animal + " appended from list") while True: if zoo == "": break else: animal_name = input("enter the name of an animal: ") if animal_name.lower().startswith("q"): break else: list_o_matic(animal_name) print(zoo) print("goodbye")