input: Write a python function to use the Calculator class to perform a sequence of operations and return the final total.
  assert perform_operations([("add", 10), ("subtract", 5), ("add", 20)]) == 25
  assert perform_operations([("add", 15), ("add", 5), ("subtract", 10)]) == 10
  assert perform_operations([("subtract", 10), ("add", 30), ("subtract", 5)]) == 15
output: class Calculator:
      def __init__(self):
          self.total = 0
  
      def add(self, value):
          self.total += value
  
      def subtract(self, value):
          self.total -= value
  
  
  def perform_operations(operations):
      calculator = Calculator()
      for operation, value in operations:
          if operation == "add":
              calculator.add(value)
          elif operation == "subtract":
              calculator.subtract(value)
      return calculator.total