Fundamentals of Computer Programming(Apply computer programming techniques to solve real world problems by Python)
Question #1: Write a python program that takes balance of a user’s account as input. It should then ask the user how much amount he\she wants to withdraw from his\her account. The program should take this amount as input and deduct from the balance. Similarly , it should ask the user how much amount he\she wants to deposit in his\her account. It should take this amount as input and add to the balance. The program shall display the new balance after amount has been withdrawn and deposited. Note : Your program should have all necessary checks on the transactions. Display a menu to the user to let him\her choose between different available options. Solution: Copy of Source Code: #program to calculate current balance after withdrawal and deposit balance=get=w=d=0 #variables required yn="y" balance=eval(input("Enter your account balance: ")) #input balance #menu for the withdrawal print("For the withdrawal") print(" 1 is to withdra...
Comments
Post a Comment