Write a program that prompts the user for their monthly deposits and withdrawals from their checking account. After each transaction, output the balance and the amount withdrawn or deposited. At the end of the program, output a formatted table of the transactions. Use the Python format function to only display two decimal places. Use a Python list to keep track of the transactions and balances.
pelin
-6
Junior Poster in Training
Recommended Answers
Jump to Postfor loop with user input count is not as user friendly as input until special value, say 0. Using eval on direct user input is considered bad idea as with suitable input user can do any OS command.
Jump to PostWhy are you having the user input the number of transactions? It just seems to me like that would become repetitive since most transactions in a month are only made once. To subtract the amount from the total balance you should - from current balance. I'll give you a hint …
Jump to Postwell there are a couple bugs with that, I haven't tested it, but I can see them.
okay so if you used the general idea of the format I have above and add in the need for the number of transactions then how do you think you could do …
All 11 Replies
pelin
-6
Junior Poster in Training
TrustyTony
888
pyMod
Team Colleague
Featured Poster
JoshuaBurleson
23
Posting Whiz
pelin
-6
Junior Poster in Training
pelin
-6
Junior Poster in Training
JoshuaBurleson
23
Posting Whiz
pelin
-6
Junior Poster in Training
JoshuaBurleson
23
Posting Whiz
pelin
-6
Junior Poster in Training
JoshuaBurleson
23
Posting Whiz
pelin
-6
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.