with a customer in order to process a deposit or withdrawal.
Assume the customer has an initial balance of $1000 (you should store the number 1000 in a variable). Then, ask the user two things:
Whether they want to make a deposit or withdrawal
For this step, they should type a deposit or withdrawal, depending on what they want to do. It needs to be the exact spelling, including capitalization!
How much money they want to deposit or withdraw
For this step, they should enter an integer.
Then, your program should use an if/elif/else statement to do the following:
If the customer is making a deposit, add the amount to their balance.
If the customer is making a withdrawal, subtract the amount from their balance.
If the customer typed something other than "deposit" or "withdrawal", print "Invalid transaction.".
In this case, the customer’s final balance is just the same as their initial balance.
Finally, your program should use an if/else statement to do the following:
If the customer’s final balance would be negative (less than zero), tell them "You cannot have a negative balance!".
Otherwise, report their final balance.
Here are some examples of what running your program should look like:
Example 1:
Deposit or withdrawal: withdrawal
Enter amount: 500
Final balance: 500
Example 2:
Deposit or withdrawal: withdrawal
Enter amount: 1500
You cannot have a negative balance!
Example 3:
Deposit or withdrawal: deposit
Enter amount: 500
Final balance: 1500