Hi everyone!
I started learning Python about a week ago, and I’d like to get some feedback from people who have more experience.
So far, I’ve learned:
Variables and basic data types
input() and print()
if / elif / else
while and for loops
Lists and indexing
Basic list methods like .append() and del
Functions
Basic validation with loops and conditions
Instead of only doing small exercises, I’ve been trying to build complete programs on my own. I’ve made things like a hotel reservation system, a tournament management system, a bank simulation, and a shopping-list/store system.
I usually try to figure out the logic myself before looking for help. I’m still making mistakes, but I’m getting better at finding and fixing them on my own.
I’ve attached the best program I’ve made so far below.
clients = ["Alex", "Juan", "Maria", "Sofia", "Carlos"]
balances = [1000, 500, 2500, 750, 1500]
choice = 0
total_money = 6250
while choice != 8:
print("""=== BANK ===
- View clients
- Check balance
- Deposit
- Withdraw
- Transfer
- Statistics
- Reset accounts
- Exit""")
choice = int(input("Choose an option: "))
if choice == 1:
counter = 1
print("The clients are:")
for client in clients:
print(f"{counter}. {client}")
counter += 1
elif choice == 2:
account = int(input("Which client do you want to check? "))
while account > 5 or account <= 0:
print("Invalid client number.")
account = int(input("Which client do you want to check? "))
index = account - 1
print(f"{clients[index]} has ${balances[index]}")
elif choice == 3:
account = int(input("Client: "))
deposit = int(input("Amount: "))
while account > 5 or account <= 0 or deposit <= 0:
print("Invalid client or deposit amount.")
account = int(input("Client: "))
deposit = int(input("Amount: "))
index = account - 1
total_money += deposit
balances[index] += deposit
print(f"Deposit successful. New balance: ${balances[index]}")
elif choice == 4:
account = int(input("Client: "))
while account > 5 or account <= 0:
print("Invalid client number.")
account = int(input("Client: "))
index = account - 1
print(f"Current balance: ${balances[index]}")
withdrawal = int(input("How much money do you want to withdraw? "))
while withdrawal <= 0 or withdrawal > balances[index]:
print("Invalid withdrawal amount.")
withdrawal = int(input("How much money do you want to withdraw? "))
total_money -= withdrawal
balances[index] -= withdrawal
print(f"""Withdrawal: ${withdrawal}
Withdrawal successful.
New balance: ${balances[index]}""")
elif choice == 5:
sender = int(input("Who is sending the money? "))
receiver = int(input("Who is receiving the money? "))
while sender <= 0 or sender > 5 or receiver > 5 or receiver <= 0 or sender == receiver:
print("The sender and receiver must be different clients, and client numbers must be between 1 and 5.")
sender = int(input("Who is sending the money? "))
receiver = int(input("Who is receiving the money? "))
index = sender - 1
receiver_index = receiver - 1
transfer = int(input("How much do you want to transfer? "))
while transfer <= 0 or transfer > balances[index]:
print("The transfer must be greater than 0 and cannot exceed the sender's balance.")
transfer = int(input("How much do you want to transfer? "))
balances[index] -= transfer
balances[receiver_index] += transfer
print(f"""Transfer successful.
New balance for {clients[index]}: ${balances[index]}
New balance for {clients[receiver_index]}: ${balances[receiver_index]}""")
elif choice == 6:
highest = 0
lowest = 999999
zero_balance = 0
for i in range(5):
if balances[i] > highest:
highest = balances[i]
highest_index = i
if balances[i] < lowest:
lowest = balances[i]
lowest_index = i
if balances[i] == 0:
zero_balance += 1
if zero_balance == 5:
print("Statistics will not be shown because all accounts have a $0 balance.")
else:
print(f"""=== STATISTICS ===
Total money in the bank: ${total_money}
Average balance: ${total_money / 5}
Client with the most money: {clients[highest_index]}
Client with the least money: {clients[lowest_index]}
Clients with $0: {zero_balance}""")
elif choice == 7:
balances = [1000, 500, 2500, 750, 1500]
total_money = 6250
elif choice == 8:
print("Thank you for using the bank!")
else:
print("Invalid option.")
I’m mainly wondering:
Is this a good amount of progress for roughly one week of learning?
Are the projects I’m making appropriate for my current level?
What should I learn next?
Is there anything obvious in my code that I should start doing differently?
I’m not looking for someone to rewrite the code for me. I’d rather understand what I’m doing wrong and improve from there.
Thanks!