One deposit, one withdrawal
Input
process_account(100, [50], [25])
Output
125
Start at 100, deposit 50 => 150, withdraw 25 => 125, return 125.
Full lesson preview
Extend a class by adding a method that modifies instance state.
Problem statement
Task
Examples
Input
process_account(100, [50], [25])
Output
125
Start at 100, deposit 50 => 150, withdraw 25 => 125, return 125.
Input format
Output format
Constraints
Samples
Input
process_account(0, [10, 20], [5])
Output
25
0 + 10 + 20 - 5 = 25