input: Write a function to simulate a simple ATM machine. The function should include an account class with deposit and withdrawal methods, as well as an ATM class to manage multiple accounts. The function should support creating accounts, depositing and withdrawing money, and printing account balances.
  
  
  # account class with the necessary functions 
  class Account:
      def __init__(self, name, balance):
          self.name = name
          self.balance = balance
  
      def deposit(self, amount):
          self.balance += amount
  
      def withdrawal(self, amount):
          self.balance -= amount
  
  # ATM class with the necessary functions
  class ATM:
      def __init__(self):
          self.accounts = []
  
      def createAccount(self, name, balance):
          account = Account(name, balance)
          self.accounts.append(account)
  
      def deposit(self, name, amount):
          for account in self.accounts:
              if account.name == name:
                  account.deposit(amount)
  
      def withdrawal(self, name, amount):
          for account in self.accounts:
              if account.name == name:
                  account.withdrawal(amount)
  
      def printBalance(self, name):
          for account in self.accounts:
              if account.name == name:
                  print(name, " Balance: ", account.balance)
  
  # Test cases
  atm = ATM()
  atm.createAccount("John", 1000)
  atm.createAccount("Jane", 2000)
  
  atm.deposit("John", 500)
  atm.withdrawal("Jane", 300)
  
  atm.printBalance("John")  # Should print: John  Balance:  1500
  atm.printBalance("Jane")  # Should print: Jane  Balance:  1700
  
output: def simulate_atm():
      class Account:
          def __init__(self, name, balance):
              self.name = name
              self.balance = balance
  
          def deposit(self, amount):
              self.balance += amount
  
          def withdrawal(self, amount):
              self.balance -= amount
  
      class ATM:
          def __init__(self):
              self.accounts = []
  
          def createAccount(self, name, balance):
              account = Account(name, balance)
              self.accounts.append(account)
  
          def deposit(self, name, amount):
              for account in self.accounts:
                  if account.name == name:
                      account.deposit(amount)
  
          def withdrawal(self, name, amount):
              for account in self.accounts:
                  if account.name == name:
                      account.withdrawal(amount)
  
          def printBalance(self, name):
              for account in self.accounts:
                  if account.name == name:
                      print(name, " Balance: ", account.balance)
  
      atm = ATM()
      atm.createAccount("John", 1000)
      atm.createAccount("Jane", 2000)
  
      atm.deposit("John", 500)
      atm.withdrawal("Jane", 300)
  
      atm.printBalance("John")
      atm.printBalance("Jane")