ATM (easy) Program in Python

ATM (easy) Program in Python



Code:

print ( " welcome to abc bank " )

print( " press a to check your current balance")

print ( "press b to withdraw " )

print ( " press c to deposite ")

option = str ( input ( " enter option : "))
cb = 1000
if (option == "a"):
    print("current balance = " ,cb)

elif ( option == "b"):
    wd = int ( input ( " enter amount to withdraw " ))
    rb = cb - wd
    print ( "remaining balance = " , rb )

elif(option == "c"):
    dp = int ( input ( " enter amount to deposite " ))
    print ( "balance after deposite " , cb + dp )

else:
    print("invaild option")







Output:


 welcome to abc bank 
 press a to check your current balance
press b to withdraw 
 press c to deposite 
 enter option : c
 enter amount to deposite 1000
balance after deposite  2000
>>>

Video Tutorial:






Post a Comment

Previous Post Next Post