

class TodoTask:
    """
    Represents a task in the to-do list
    """

    def __init__(self, description):
        """
        Initialize a to-do list task item
        """

        self.description = description
        self.completionStatus = 0
        self.visible = True
        self.mode = 0


class TodoTask:
    """
    Represents a task in the to-do list
    """

    def __init__(self, description):
        """
        Initialize a to-do list task item
        """

        self.description = description
        self.completionStatus = 0
        self.visible = True
        self.mode = 0

    def __str__(self):
        if completionStatus == 0:
            return self.description
        elif completionStatus == 1:
            return "--- " + self.description + " ---"
Implement str method for TodoTask class
feature: Implement str method for TodoTask class

  
  
  class TodoTask:
      """
      Represents a task in the to-do list
      """
  
      def __init__(self, description):
          """
          Initialize a to-do list task item
          """
  
          self.description = description
          self.completionStatus = 0
          self.visible = True
          self.mode = 0
+ 
+     def __str__(self):
+         if completionStatus == 0:
+             return self.description
+         elif completionStatus == 1:
+             return "--- " + self.description + " ---"
Implement str method for TodoTask class
## Code Before:


class TodoTask:
    """
    Represents a task in the to-do list
    """

    def __init__(self, description):
        """
        Initialize a to-do list task item
        """

        self.description = description
        self.completionStatus = 0
        self.visible = True
        self.mode = 0
## Instruction:
Implement str method for TodoTask class
## Code After:


class TodoTask:
    """
    Represents a task in the to-do list
    """

    def __init__(self, description):
        """
        Initialize a to-do list task item
        """

        self.description = description
        self.completionStatus = 0
        self.visible = True
        self.mode = 0

    def __str__(self):
        if completionStatus == 0:
            return self.description
        elif completionStatus == 1:
            return "--- " + self.description + " ---"