---
# System prepended metadata

title: 'MY EXPERIENCE WITH LOOPS (for '

---

****MY EXPERIENCE WITH LOOPS (for and while loops)

It has been a challenging experience, trying to wrap my head around the fact that the computer will only respond to what it understands in my code, hence the need to pay attention to rightly communicate your intention to the computer in oder to get a desired result or output.

Understanding this concept has made me intrested in mistakes, bugs and wrong lines of code because in trying to fix them, i have learned new and better ways of writting my code.

I find comfort in using for loops in programs that display a logic of for numbers,
while loops works easily for simulating a system with unknown number of conditions in code.
Below is code for an updated version of an ATM with better logic than the earlier one we did:

    user = 0
    balance = 10000
    password = 9009
    print("""
    ======MY BANK=====
    1. Check Transfer
    2. Transfer 
    3. Deposit
    4. Pay Bills
    5. Exit

    """)
    while user == 0:
    choice = input("Select Operation: ")
    if choice.isdigit():
        print(choice)
        if int(choice) == 1:
            print("Check Balance")
            user_password = input("Password: ")
            if user_password.isdigit():
                if int(user_password) == password:
                    print(f"Checking Status...\nYour current balance is N{balance:.2f}\n")
                else:
                    print("incorrect password\n")
            else:
                print("Invalid password format\n")
        elif int(choice) == 2:
            print("Enter Transfer details")
            amount = input("Transfer Amount N: ")
            bank_name = input("Name of Bank: ")
            acc_no = input("Destination Account Number: ")
            account_name = input("Account Holder's Name: ")
            if amount.isdigit() and acc_no.isdigit():
                print(f"\nYou are about to send N{amount} to {account_name} at {bank_name}\n")
                send = input("Enter 'Y' to continue or 'N' to cancel: ")
                send = send.upper()
                if send == "Y":
                    if balance >= int(amount):
                        balance -= int(amount)
                        print(f"Transfer Successful\nYour new balance is N{balance:.2f}\n")

                    else:
                        print("Insufficient balance\n")
                elif send == "N":
                    print("Transaction CAncelled\n")

            else:
                print("Invalid Transfer details\n")
        elif int(choice) == 3:
            deposit = input("Enter Deposit Amount: ")
            if deposit.isdigit():
                balance += int(deposit)
                print(f"Deposit Sucessful\n\nYour new Balance is {balance}\n")
            else:
                print("Invalid deposit Input\n")
        elif int(choice) == 4:
            print('''
            1. Light bill
            2. Water bill
            ''')
            utility = input("Select Utility bill: ")
            if utility.isdigit():
                if int(utility) == 1:
                    balance -= 2000
                    print(f"Light bill payment Succesfull\nLight cost N2000, account balance is {balance}")
                elif int(utility) == 2:
                    balance -= 1500
                    print(f"Water bill payment Succesfull\nWater cost N1500, account balance is {balance}")
                else:
                    print("Invalid Bill input")

            else:
                print("Invalid utility Option")
        else:
            print("Thankyou for using MY ATM\nGoodbye")
                                                     
The next lines of code below accepts a number from user, and prints the multiplication table for that number from 1 to 10, this continues until the user input is not a number:

    Multiplication Table
    Create a program that asks the user for a number and then uses a while loop to print the multiplication table for that number from 1 to 10.
    '''
    user = 0
    while user == 0:
    number = input("Enter number: ")
    if number.isdigit():
        for a in range(1, 11):
            result = int(number) * a
            print(f"{a}) {number} * {a} = {result}")
    else:
        print("Invalid Input")
        break

This past week has been very productive to me and educating. 
The peak of it was PRODFEST Web3jos Confrence 2025, which involved Hackathon and the confrence, where we got to learn more about Web3 products and get inspired by the pool of blockchain Engineers that spoke at the confrence. 

I did not part take in the Hackathon because my knowledge now is not proficient enough to handle competion at that level, but i am sure that, with this learning speed, I should be paert of the hackers at PRODFEST 2026.

A big thanks to our mentors at Blockfuse Labs.
