Example #1
0
def ogrenci_ekle():

    os.system('cls' if os.name == 'nt' else 'clear')

    print(
        "\n Necmettin Erbakan Üniversitesi Öğrenci Bilgi Sistemi - Öğrenci ekle"
    )

    ad_soyad = input("\n\n  Öğrenci adı, soyadı : ")
    tc_no = input("\n\n  Öğrenci T.C no : ")
    okul_no = input("\n\n  Öğrenci okul no : ")
    bolum = input("\n\n  Öğrenci Bölümü : ")
    ders_sayi = input("\n\n  Öğrenci aldığı ders sayısı : ")

    ders = []

    if int(ders_sayi) > 0:

        az = 1

        for i in range(0, int(ders_sayi)):

            print("\n\n --- Ders Ekle {} ---".format(az))

            ders_adi = input("\n\n    Ders adi : ")
            ders_kodu = input("\n\n    Ders kodu : ")
            ders_final_oran = input("\n\n    Ders final oranı (örn: 0.6) : ")
            ders_vize_oran = input("\n\n    Ders vize oranı (örn: 0.4) : ")

            ders.append(
                Class.Dersler(ders_adi, ders_kodu, ders_vize_oran,
                              ders_final_oran, -1, -1))

    Ogrenciler.append(
        Class.Ogrenci(ad_soyad, tc_no, okul_no, int(ders_sayi), bolum, ders))

    input(
        "\n\n   Ogrenci başarıyla eklenmiştir... Ana menü için Entere basınız."
    )