Day 33 fix my code mistake in solution

For the second fix my code challenge on Day 33 part of the solution is missing.

The problem is with the append function. We have two objects backwards. The list name comes first and then what’s being added to the list goes inside (). Hint: You will see the same issue with remove too.

It always needs to be: listname.append() or listname.remove()

myAgenda = []

def printList():
  for item in myAgenda:

while True:
  menu = input("Add or Remove?: ")
  if menu == "add":
    item = input("What's next on the Agenda?: ")
  elif menu == "remove":
    item = ("What do you want to remove?: ")
    if item in myAgenda:
      print(f"{item} was not in the list")

The other problem that isn’t mentioned

  elif menu == "remove":
    item = ("What do you want to remove?: ")

This should be

  elif menu == "remove":
    item = input("What do you want to remove?: ")

Hi @brian137!
You should be able to see the solution on the page. Could you send a screenshot of the solution file?

@QwertyQwerty88 The top of the post said that he cant access part of the solution.

That’s not what OP said. In 100DoC there are chapters called “Fix my code” where they provide some broken code for you to fix. They also provide the fixed code and an explanation to what they did. However, as OP said, it did not mention the other (logic) error with the code:


@QwertyQwerty88 got it.

1 Like