Ad
  • Default User Avatar

    You can not iterate through a loop numbers, in your case the variable "numbers" is a string.
    Therefore, you should make a statement under the for loop statement that estabilishes that the variable "num" is an integer.

    You do that by typing:
    num=int(num)

    and then you continue with your if statement.