Create a class BankAccount with deposit and withdraw methods.
MediumProblem Statement
Create a class BankAccount with deposit and withdraw methods.
Sample Input
Initial Balance: 1000, Operations: deposit(500), withdraw(300)
Sample Output
Balance after deposit: 1500 Balance after withdrawal: 1200
Limits
Time: 2s · Memory: 256 MB