looking for help with exercise please provide a simple python script and explanation  I have provided my code as well what would you change? Write a program that keeps track of user's balance in their account after each transaction. Have the program ask for their initial balance and then keep track of their current balance after each transaction, until the user stops the program. 1. Welcome banner 2. ask for starting balance 3. ask to specify transaction type in (w) for withdrawal or (d) for deposit. 4. prompt the user for the amount for the transaction. doesn't need to be validated. 5.print the new balance 6. prompt the user if they want to continue with another transaction. if they enter Y or y repeat steps 3-6.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

looking for help with exercise

please provide a simple python script and explanation 

I have provided my code as well

what would you change?

Write a program that keeps track of user's balance in their account after each transaction. Have the program ask for their initial balance and then keep track of their current balance after each transaction, until the user stops the program.

1. Welcome banner

2. ask for starting balance

3. ask to specify transaction type in (w) for withdrawal or (d) for deposit.

4. prompt the user for the amount for the transaction. doesn't need to be validated.

5.print the new balance

6. prompt the user if they want to continue with another transaction.

if they enter Y or y repeat steps 3-6.

 

 

1 dash="-"*60
2 print ("Welcome to Funnyville Bank.")
3 print ()
4 print (dash)
6 withdraw-0
7 deposit-0
8 choice="Y"
69
10 while (choice.lower ()="y") :
11
12
while True:
13
14
start=int (input ("Please enter your starting balance: "))
transaction=input ("please enter the type of transaction (w/d) : ")
print ()
15
print (dash)
16
17
18
19
20
21
if (transaction=="W" or transaction.lower ()=="w"):
withdraw-int (int ("please enter amount:")
new-start-withdraw
print ("New balance: ", new)
print ()
print (dash)
24
25
26
new-new
break
elif(transaction=-"D" f transaction.lower )=="d"):
desposit=int (int ("please enter amount:" )
new-start+deposit
print ("New balance:", new)
29
30
print ()
print (dash)
32
33
34
35
new-new
break
else:
print ("Please enter (W/D) for transaction type.)
37
choice = input ("Continue? (Y/N): ")
39
40
41
if (choice.lower () !-"y"):
print ("-
print ("New Balance:",new)
print ("Bye!"
42
43
44
45
46
Ln: 26 Col: 3
2 3
224N 3
330 3
9333
Transcribed Image Text:1 dash="-"*60 2 print ("Welcome to Funnyville Bank.") 3 print () 4 print (dash) 6 withdraw-0 7 deposit-0 8 choice="Y" 69 10 while (choice.lower ()="y") : 11 12 while True: 13 14 start=int (input ("Please enter your starting balance: ")) transaction=input ("please enter the type of transaction (w/d) : ") print () 15 print (dash) 16 17 18 19 20 21 if (transaction=="W" or transaction.lower ()=="w"): withdraw-int (int ("please enter amount:") new-start-withdraw print ("New balance: ", new) print () print (dash) 24 25 26 new-new break elif(transaction=-"D" f transaction.lower )=="d"): desposit=int (int ("please enter amount:" ) new-start+deposit print ("New balance:", new) 29 30 print () print (dash) 32 33 34 35 new-new break else: print ("Please enter (W/D) for transaction type.) 37 choice = input ("Continue? (Y/N): ") 39 40 41 if (choice.lower () !-"y"): print ("- print ("New Balance:",new) print ("Bye!" 42 43 44 45 46 Ln: 26 Col: 3 2 3 224N 3 330 3 9333
Sample run 1:
Python 3.6.3 Shell
Eile Edit Shell Debug Options Window Help
Welcome to the Bank of Funnyville
Please enter the starting balance: 1000
Enter the type of transaction (w/d) : w
Enter the amount: 150
New balance = $850
Continue (Y/n) ? y
Enter the type of transaction (w/d): W
Enter the amount: 75
New balance $775
Continue (y/n) ? y
Enter the type of transaction (w/d) d
Enter the amount 200
New balance = $975
Continne (Y/n) ? n
Your final balance: $975
Goodbye!
Ln: 57 Cot 4
1.
Transcribed Image Text:Sample run 1: Python 3.6.3 Shell Eile Edit Shell Debug Options Window Help Welcome to the Bank of Funnyville Please enter the starting balance: 1000 Enter the type of transaction (w/d) : w Enter the amount: 150 New balance = $850 Continue (Y/n) ? y Enter the type of transaction (w/d): W Enter the amount: 75 New balance $775 Continue (y/n) ? y Enter the type of transaction (w/d) d Enter the amount 200 New balance = $975 Continne (Y/n) ? n Your final balance: $975 Goodbye! Ln: 57 Cot 4 1.
Expert Solution
steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Knowledge Booster
Windows
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education