keyboard_arrow_left keyboard_arrow_right
Ayana's Project

ATM Working Program

About Ayana

Ayana is going to be in the 5th grade this academic year. She is very vibrant creative kid who likes to explore the programming horizon through Python. Even though, she sees herself as future biologist, she enjoys playing games on computers and she would like to give life to the characters of her imagination in the virtual world. She also loves music, dance and her books.

Ayana's project details:

Ayana has decoded how ATM machine logic works to dispense correct number of currency notes. Try out for yourself. Enter an amount you would like to withdraw and the programme will tell how many currency notes and its corresponding denomination of currency notes that will be dispatched from the ATM machine.

print(" -------------------------------------------------------------------------------------------------")
print("This ATM dispatches currencies of Rs. 100 , 200 , 500 , 2000")
print(" -------------------------------------------------------------------------------------------------")
# the amout of money you would like goes down below
amount = int(input("Enter the amout here in multiples of 100"))    
remainder = amount             
total= 0
while remainder != 0:
    if amount % 100 != 0:
        print("""  The denomination you are looking for is not available in our ATM.  Please try denomination in multiple of 100's.""")
    elif remainder >= 2000:
        remainder = remainder - 2000
        total = total + 1000
        print("dispaching currency note Rs. 2000")
    elif remainder >=  500:
        remainder = remainder - 500
        total = total + 500
        print("dispaching currency note Rs. 500")
    elif remainder >= 200:
        remainder = remainder - 200
        total= total + 200
        print("dispaching currency note Rs. 200")
        remainder = remainder - 100
        total= total + 100
        print("dispaching currency note Rs. 100")

if(total > 0):
    print("Please collect your cash.")
print("Thank you for visting our ATM , We hope that you come back soon :) ")
Name: Ayana Binoj Menon
Grade: 5
Be the Next Creator like :

  "Ayana always looks forward her Python classes every week and the main reason for her interest in the class is her teacher. The teacher's motivation helps her to move forward to learn new concepts and build a strong foundation in the programming world. Also, teacher's support helps her to boost her confidence."
Parents of Ayana Menon