Python Forum
Can you help about my learning project
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can you help about my learning project
#1
Hello, I'm taking python course online and there was a task about logging in program and ATM program these two were should be different but I wanted to combine them for improving my skills but I couldn't run the codes. I'll add codes below can you guys help me about that.
NOTE: there are some Turkish words maybe you want to know I'm translating these words to the English for better understanding.
Kullanıcı adi means user name
şifre means password
giriş hakkı means a limit of wrong tryings

sys_kullanıcı_adi = "nnerit"
sys_sifre = "ozzden12"
giris_hakki = 3
bakiye = 5000
while True:
    Kullanici_adi = input("Lütfen kullanıcı adınızı giriniz...")
    sifre = input("Lütfen şifrenizi giriniz...")
    if Kullanici_adi != sys_kullanıcı_adi and sifre != sys_sifre:
        print("Kullanıcı adınızı ve şifrenizi yanlış girdiniz...")
        giris_hakki -= 1
    elif Kullanici_adi == sys_kullanıcı_adi and sifre != sys_sifre:
        print("Şifrenizi yanlış girdiniz...")
        giris_hakki -= 1
    elif Kullanici_adi != sys_kullanıcı_adi and sifre == sys_sifre:
        print("Kullanıcı adınızı yanlış girdiniz...")
        giris_hakki -= 1
    else:
        print("Başarıyla giriş yaptınız...")
        print(
            "YAPMAK İSTEDİĞİNİZ İŞLEMİ GİRİNİZ İŞLEMLER: 1. İŞLEM BAKİYE SORGULAMA \n 2. İŞLEM PARA YATIRMA \n 3. İŞLEM PARA ÇEKME")
        işlem = input("Lütfen yapmak istediğiniz işlemi tuşlayın. Çıkmak için q tuşuna basın...")
        if işlem == "q":
            print("Yine bekleriz...")
            break
        elif işlem == "1":
            print(bakiye)
        elif işlem == "2":
            yatırım = int(input("Lütfen yatırmak istediğiniz miktarı giriniz.."))
            bakiye = bakiye + yatırım
            print(bakiye)
        else:
            çekiş = int(input("Çekmek istediğiniz miktarı giriniz..."))
            bakiye = bakiye - çekiş
            if bakiye < 0:
                print("Hesabınızda yeterli para bulunmamaktadır..")
            else:
                print("Bakiyeniz: ", bakiye

    if giris_hakki == 0:
        print("Giriş hakkınız kalmadı...")
        break
Reply
#2
When posting code that is not functioning correctly, please also explain what you expect to happen and what is actually happening and any errors received in error tags.

There is a ) missing from the end of the following line

print("Bakiyeniz: ", bakiye
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020