Basit ATM Sistemi

18 Haz 2022
168
1
33
Merhabalar python öğrenmeye yeni başladım (2 ay oldu ) dün can sıkıntısından birşey yapayım dedim ve aklıma ATM sistemi geldi bu sistemi sizinle paylaşmak istedim
Python:
# python 3.7.1

balance = 1000

def login():
    username = input("Enter your username: ")
    password = input("Enter your password: ")
    if username == "admin" and password == "admin":
        print("\nLogin successful!")
        return True
    else:
        print("Incorrect username or password.")
        return False

def main_menu():
    print("\nWelcome to the ATM!")
    print("1. Check Balance")
    print("2. Withdraw")
    print("3. Deposit")
    print("4. Exit")
    choice = input("Enter your choice: ")
    return choice

def check_balance():
    print("Your current balance is: $", balance)

def withdraw():
    global balance
    amount = int(input("Enter the amount to withdraw: "))
    if amount > balance:
        print("Insufficient balance!")
    else:
        balance -= amount
        print("Withdrawal successful! Your new balance is: $", balance)

def deposit():
    global balance
    amount = int(input("Enter the amount to deposit: "))
    balance += amount
    print("Deposit successful! Your new balance is: $", balance)

while not login():
    continue

while True:
    choice = main_menu()
    if choice == "1":
        check_balance()
    elif choice == "2":
        withdraw()
    elif choice == "3":
        deposit()
    elif choice == "4":
        print("Thank you for using the ATM!")
        break
    else:
        print("Invalid choice. Please try again.")
 

rootibo

Kıdemli Üye
13 Mar 2023
2,169
12
1,460
Merhabalar python öğrenmeye yeni başladım (2 ay oldu ) dün can sıkıntısından birşey yapayım dedim ve aklıma ATM sistemi geldi bu sistemi sizinle paylaşmak istedim
Python:
# python 3.7.1

balance = 1000

def login():
    username = input("Enter your username: ")
    password = input("Enter your password: ")
    if username == "admin" and password == "admin":
        print("\nLogin successful!")
        return True
    else:
        print("Incorrect username or password.")
        return False

def main_menu():
    print("\nWelcome to the ATM!")
    print("1. Check Balance")
    print("2. Withdraw")
    print("3. Deposit")
    print("4. Exit")
    choice = input("Enter your choice: ")
    return choice

def check_balance():
    print("Your current balance is: $", balance)

def withdraw():
    global balance
    amount = int(input("Enter the amount to withdraw: "))
    if amount > balance:
        print("Insufficient balance!")
    else:
        balance -= amount
        print("Withdrawal successful! Your new balance is: $", balance)

def deposit():
    global balance
    amount = int(input("Enter the amount to deposit: "))
    balance += amount
    print("Deposit successful! Your new balance is: $", balance)

while not login():
    continue

while True:
    choice = main_menu()
    if choice == "1":
        check_balance()
    elif choice == "2":
        withdraw()
    elif choice == "3":
        deposit()
    elif choice == "4":
        print("Thank you for using the ATM!")
        break
    else:
        print("Invalid choice. Please try again.")
Eline saglik 2 aylik surece gore cok iyi
 

Muslukcu

Katılımcı Üye
17 Kas 2021
699
265
Tesisat dükkanı
Merhabalar python öğrenmeye yeni başladım (2 ay oldu ) dün can sıkıntısından birşey yapayım dedim ve aklıma ATM sistemi geldi bu sistemi sizinle paylaşmak istedim
Python:
# python 3.7.1

balance = 1000

def login():
    username = input("Enter your username: ")
    password = input("Enter your password: ")
    if username == "admin" and password == "admin":
        print("\nLogin successful!")
        return True
    else:
        print("Incorrect username or password.")
        return False

def main_menu():
    print("\nWelcome to the ATM!")
    print("1. Check Balance")
    print("2. Withdraw")
    print("3. Deposit")
    print("4. Exit")
    choice = input("Enter your choice: ")
    return choice

def check_balance():
    print("Your current balance is: $", balance)

def withdraw():
    global balance
    amount = int(input("Enter the amount to withdraw: "))
    if amount > balance:
        print("Insufficient balance!")
    else:
        balance -= amount
        print("Withdrawal successful! Your new balance is: $", balance)

def deposit():
    global balance
    amount = int(input("Enter the amount to deposit: "))
    balance += amount
    print("Deposit successful! Your new balance is: $", balance)

while not login():
    continue

while True:
    choice = main_menu()
    if choice == "1":
        check_balance()
    elif choice == "2":
        withdraw()
    elif choice == "3":
        deposit()
    elif choice == "4":
        print("Thank you for using the ATM!")
        break
    else:
        print("Invalid choice. Please try again.")
Eline sağlık
 

Kudad

Katılımcı Üye
14 Nis 2021
631
3
138
Merhabalar python öğrenmeye yeni başladım (2 ay oldu ) dün can sıkıntısından birşey yapayım dedim ve aklıma ATM sistemi geldi bu sistemi sizinle paylaşmak istedim
Python:
# python 3.7.1

balance = 1000

def login():
    username = input("Enter your username: ")
    password = input("Enter your password: ")
    if username == "admin" and password == "admin":
        print("\nLogin successful!")
        return True
    else:
        print("Incorrect username or password.")
        return False

def main_menu():
    print("\nWelcome to the ATM!")
    print("1. Check Balance")
    print("2. Withdraw")
    print("3. Deposit")
    print("4. Exit")
    choice = input("Enter your choice: ")
    return choice

def check_balance():
    print("Your current balance is: $", balance)

def withdraw():
    global balance
    amount = int(input("Enter the amount to withdraw: "))
    if amount > balance:
        print("Insufficient balance!")
    else:
        balance -= amount
        print("Withdrawal successful! Your new balance is: $", balance)

def deposit():
    global balance
    amount = int(input("Enter the amount to deposit: "))
    balance += amount
    print("Deposit successful! Your new balance is: $", balance)

while not login():
    continue

while True:
    choice = main_menu()
    if choice == "1":
        check_balance()
    elif choice == "2":
        withdraw()
    elif choice == "3":
        deposit()
    elif choice == "4":
        print("Thank you for using the ATM!")
        break
    else:
        print("Invalid choice. Please try again.")
ellerine sağlık dostum. geliştirmen için tavsiye vereyim istersen:
-balance baştan belirli sql dili ile depolama sistemi yapabilirsin.
-projeyi merkezi sistem yapıp sunucuya bağlayabilirsin.
-merkezi sistemden çıkarıp blockchain gibi veya daha değişik algoritmalarla büyütebilirsin.
gibi gibi...
 
18 Haz 2022
168
1
33
Teşekkür ederim

Teşekkür ederim

ellerine sağlık dostum. geliştirmen için tavsiye vereyim istersen:
-balance baştan belirli sql dili ile depolama sistemi yapabilirsin.
-projeyi merkezi sistem yapıp sunucuya bağlayabilirsin.
-merkezi sistemden çıkarıp blockchain gibi veya daha değişik algoritmalarla büyütebilirsin.
gibi gibi...
Çok teşekkür ederim dikkate alacağım birazda daha gelişince onlarıda yapacağım
 

ACE Veen

Uzman üye
4 Şub 2023
1,152
5
577
Belirsiz
Merhabalar python öğrenmeye yeni başladım (2 ay oldu ) dün can sıkıntısından birşey yapayım dedim ve aklıma ATM sistemi geldi bu sistemi sizinle paylaşmak istedim
Python:
# python 3.7.1

balance = 1000

def login():
    username = input("Enter your username: ")
    password = input("Enter your password: ")
    if username == "admin" and password == "admin":
        print("\nLogin successful!")
        return True
    else:
        print("Incorrect username or password.")
        return False

def main_menu():
    print("\nWelcome to the ATM!")
    print("1. Check Balance")
    print("2. Withdraw")
    print("3. Deposit")
    print("4. Exit")
    choice = input("Enter your choice: ")
    return choice

def check_balance():
    print("Your current balance is: $", balance)

def withdraw():
    global balance
    amount = int(input("Enter the amount to withdraw: "))
    if amount > balance:
        print("Insufficient balance!")
    else:
        balance -= amount
        print("Withdrawal successful! Your new balance is: $", balance)

def deposit():
    global balance
    amount = int(input("Enter the amount to deposit: "))
    balance += amount
    print("Deposit successful! Your new balance is: $", balance)

while not login():
    continue

while True:
    choice = main_menu()
    if choice == "1":
        check_balance()
    elif choice == "2":
        withdraw()
    elif choice == "3":
        deposit()
    elif choice == "4":
        print("Thank you for using the ATM!")
        break
    else:
        print("Invalid choice. Please try again.")
Python:
print("asd")
print("asd")
print("asd")
print("asd")
yazmak yerine
Python:
print("""
asd
asd
asd
asd
""")
yazabilirsin
 

OBT is HeRYerDe

Kıdemli Üye
11 Ara 2020
2,677
9
1,533
Öncelikle Eline Sağlık, Kullanıcıdan Aldığın Username Ve Password Bilgilerini 'admin' Yerine İnput Değerlerini Atarsan Daha İyi Olacaktır.

Python:
entered_username = input("Enter Your Username: ")

entered_password = input("Enter Your Password: ")

if ((entered_username == username) and (entered_password == password)):
        print("\nLogin successful!")
        return True
 
Son düzenleme:
18 Haz 2022
168
1
33
Öncelikle Eline Sağlık, Kullanıcıdan Aldığın Username Ve Password Bilgilerini 'admin' Yerine İnput Değerlerini Atarsan Daha İyi Olacaktır.

Python:
entered_username = input("Enter Your Username: ")

entered_password = input("Enter Your Password: ")

if ((entered_username == username) and (entered_password == password)):
        print("\nLogin successful!")
        return True
Teşekkür ederim dikkate alacağım
 

kelvinxry

Katılımcı Üye
23 Ara 2022
369
105
Merhabalar python öğrenmeye yeni başladım (2 ay oldu ) dün can sıkıntısından birşey yapayım dedim ve aklıma ATM sistemi geldi bu sistemi sizinle paylaşmak istedim
Python:
# python 3.7.1

balance = 1000

def login():
    username = input("Enter your username: ")
    password = input("Enter your password: ")
    if username == "admin" and password == "admin":
        print("\nLogin successful!")
        return True
    else:
        print("Incorrect username or password.")
        return False

def main_menu():
    print("\nWelcome to the ATM!")
    print("1. Check Balance")
    print("2. Withdraw")
    print("3. Deposit")
    print("4. Exit")
    choice = input("Enter your choice: ")
    return choice

def check_balance():
    print("Your current balance is: $", balance)

def withdraw():
    global balance
    amount = int(input("Enter the amount to withdraw: "))
    if amount > balance:
        print("Insufficient balance!")
    else:
        balance -= amount
        print("Withdrawal successful! Your new balance is: $", balance)

def deposit():
    global balance
    amount = int(input("Enter the amount to deposit: "))
    balance += amount
    print("Deposit successful! Your new balance is: $", balance)

while not login():
    continue

while True:
    choice = main_menu()
    if choice == "1":
        check_balance()
    elif choice == "2":
        withdraw()
    elif choice == "3":
        deposit()
    elif choice == "4":
        print("Thank you for using the ATM!")
        break
    else:
        print("Invalid choice. Please try again.")
Elinize sağlık.
 
Üst

Turkhackteam.org internet sitesi 5651 sayılı kanun’un 2. maddesinin 1. fıkrasının m) bendi ile aynı kanunun 5. maddesi kapsamında "Yer Sağlayıcı" konumundadır. İçerikler ön onay olmaksızın tamamen kullanıcılar tarafından oluşturulmaktadır. Turkhackteam.org; Yer sağlayıcı olarak, kullanıcılar tarafından oluşturulan içeriği ya da hukuka aykırı paylaşımı kontrol etmekle ya da araştırmakla yükümlü değildir. Türkhackteam saldırı timleri Türk sitelerine hiçbir zararlı faaliyette bulunmaz. Türkhackteam üyelerinin yaptığı bireysel hack faaliyetlerinden Türkhackteam sorumlu değildir. Sitelerinize Türkhackteam ismi kullanılarak hack faaliyetinde bulunulursa, site-sunucu erişim loglarından bu faaliyeti gerçekleştiren ip adresini tespit edip diğer kanıtlarla birlikte savcılığa suç duyurusunda bulununuz.