Given a few transactions (deposit, withdrawal), and we have to compute the Net Amount of that bank account based on these transactions in Python.
Example:
Input:
Enter transactions: D 10000
Want to continue (Y for yes): Y
Enter transaction: W 5000
Want to continue (Y for yes): Y
Enter transaction: D 2000
Want to continue (Y for yes): Y
Enter transaction: W 100
Want to continue (Y for yes): N
Output:
Net amount: 6900
Program:
Output
Enter transaction: D 10000 want to continue (Y for yes) : Y Enter transaction: W 5000 want to continue (Y for yes) : Y Enter transaction: D 2000 want to continue (Y for yes) : Y Enter transaction: W 100 want to continue (Y for yes) : N Net amount: 6900need an explanation for this answer? contact us directly to get an explanation for this answer