Given the class Account
, complete the function main1_account
that takes a list of Account
objects as a parameter, and prints out each account name and number, as shown below.


class Account: "'Class representing a bank account'.' def __init_(self, num, name, holder, balance): self.num = num \# account number self.name = name \# account name e.g. 'saving', 'credit' etc. self.holder = holder \# name of the account holder self.balance = balance \# initial balance def __str__(self): desc = self.name +"′s account, number "+str( self.num) return desc def deposit(self, amount): self.balance += amount def is_positive_balance(self): return self.balance >θ
Given the class complete the function that takes a list of objects as a parameter, and prints out each account name and number, as shown below. Example usage: >> acc = [Account (218911, 'saving', 'Cleo', 1210.70), Account(315917, 'saving', 'Jo', 10210.40), Account(419918, 'investment', 'Amy', 1500.80), Account(518910, 'credit', 'Jessica', 3000.35), Account(212912, 'saving', 'Patrick', 10100.00), Account(617915, 'investment', 'Damian', 1810.70), Account(418912, 'credit', 'Stanley', 4500.65), Account(515913, "credit', "Omar', 6000.25), Account(218919, 'saving', 'Nat', 1900.45), Account(810911, 'credit', 'Andrew', 3200.86)] >> main1_account(acc) output: saving's account, number 218911 saving's account, number 315917 investment's account, number 419918 credit's account, number 518910 saving's account, number 212912 investment's account, number 617915 credit's account, number 418912 credit's account, number 515913 saving's account, number 218919 credit's account, number 810911