Atm through Function Program in Python

Atm through Function Program in 
Python


Code:

def current_balance (cb):
    print("current balance",cb)
def withdraw (wd):
    if (cb<wd):
        print("error")
    else:
        print("you withdrawal:",wd,"remaining balance",cb-wd)
def deposite (dp):
    print("deposite",dp,"total money",cb+dp)
cb=100000
current_balance(100000)
withdraw(500)
deposite(1000)







Output:


current balance 100000
you withdrawal: 500 remaining balance 99500
deposite 1000 total money 101000
>>> 


Video Tutorial:




Post a Comment

Previous Post Next Post