Computer Science, asked by ekpaimoise03, 2 months ago

The __str__ method of the Bank class (in bank.py) returns a string containing the accounts in random order. Design and implement a change that causes the accounts to be placed in the string in ascending order of name.

Implement the __str__ method of the bank class so that it sorts the account values before printing them to the console.

In order to sort the account values you will need to define the __eq__ and __lt__ methods in the SavingsAccount class (in savingsaccount.py).

The __eq__ method should return True if the account names are equal during a comparison, False otherwise.

The __it__ method should return True if the name of one account is less than the name of another, False otherwise.
here is the two code that I wrote but doesn't work

Answers

Answered by nikitapawar9545
0

Answer:

good morning dear have a great day ahead please follow me and thanks my all answers

Answered by Nathalie14
1

Answer:

o-o

Explanation:

o-0

Similar questions