|
1 | 1 | #!/usr/bin/python3
|
| 2 | +import os |
| 3 | +from colorama import Fore, init |
| 4 | +init(autoreset=True) |
2 | 5 | "Copyright© 2023 LinuxUsersLinuxMint"
|
3 | 6 | "Python Calcutator Tüm Hakları GPL(Genel Kamu Lisansı) altında korunmaktadır."
|
4 | 7 | "Python Calcutator All Rights Reserved under the GPL(General Public License)."
|
5 | 8 | "Bu Yazılımın Bir Kopyası GİTHUB da yayınlanmaktadır Görüntülemek için: https://github.com/LinuxUsersLinuxMint/LinuxUsersLinuxMint"
|
6 | 9 | "A Copy of This Software is published on GITHUB To view: https://github.com/LinuxUsersLinuxMint/LinuxUsersLinuxMint"
|
| 10 | +print("******************************************************") |
| 11 | +print("*** Python-Calcutator 0.2.5 Programına Hoşgeldiniz ***") |
| 12 | +print("""*** Seçenekler: *** |
7 | 13 |
|
8 |
| -command=str(input('calc> ')) |
9 |
| -about="Python Hesap Makinesi CLI(Command Line Interface / Komut Satırı Arayüzü) LICENCE=GPL2" |
| 14 | +*** Seçmek istediğiniz Komutu Giriniz... *** |
10 | 15 |
|
| 16 | +1. calc |
| 17 | +2. about |
| 18 | +3. exit |
| 19 | +4. help |
| 20 | +5. git-address |
| 21 | +6. ver |
| 22 | +7. licence""") |
| 23 | +command=str(input(Fore.LIGHTBLUE_EX +'calc> ')) |
| 24 | +os.system("clear") |
| 25 | +about="Python Hesap Makinesi CLI(Command Line Interface / Komut Satırı Arayüzü) LICENCE=GPL2" |
| 26 | +secilen_islem=str(Fore.LIGHTBLUE_EX+"None") |
11 | 27 | if command=="calc":
|
12 |
| - print("calc> Girebileceğiniz işlemler: ") |
13 |
| - print("top\ncık\n\carp\nbol\nyuzde\nabout") |
| 28 | + print("""calc> Girebileceğiniz işlemler: |
| 29 | + Seçilen İşlem={0}""". format(secilen_islem)) |
| 30 | + print(""" |
| 31 | +1. Toplama |
| 32 | +2. Çıkarma |
| 33 | +3. Çarpma |
| 34 | +4. Bölme |
| 35 | +5. Yüzde""") |
| 36 | + islem=input('calc> Seçmek İstediğiniz İşlemin Numarasını Giriniz: ') |
| 37 | + os.system("clear") |
| 38 | + |
| 39 | + secilen_islem=islem |
| 40 | + print("""calc> Seçilen İşlem: |
| 41 | + Seçilen İşlem={0}""". format(secilen_islem)) |
14 | 42 | sayi1=input('calc> 1. sayiyi giriniz: ')
|
15 | 43 | sayi2=input('calc> 2. sayiyi giriniz: ')
|
16 |
| - islem=input('calc> Gerçekleştirmek İstediğiniz İşlemi Giriniz: ') |
| 44 | + os.system("clear") |
17 | 45 | top=float(sayi1)+float(sayi2)
|
18 | 46 | cık=float(sayi1)-float(sayi2)
|
19 | 47 | carp=float(sayi1)*float(sayi2)
|
20 | 48 | bol=float(sayi1)/float(sayi2)
|
21 | 49 | yuzde=float(sayi1)%float(sayi2)
|
22 |
| - if islem=="top": |
| 50 | + if islem=="1": |
23 | 51 | print("{0} + {1} = {2}". format(sayi1,sayi2,top))
|
24 |
| - elif islem=="cık": |
| 52 | + elif islem=="2": |
25 | 53 | print("{0} - {1} = {2}". format(sayi1,sayi2,cık))
|
26 |
| - elif islem=="carp": |
| 54 | + elif islem=="3": |
27 | 55 | print("{0} * {1} = {2}". format(sayi1,sayi2,carp))
|
28 |
| - elif islem=="bol": |
| 56 | + elif islem=="4": |
29 | 57 | print("{0} / {1} = {2}". format(sayi1,sayi2,bol))
|
30 |
| - elif islem=="yuzde": |
| 58 | + elif islem=="5": |
31 | 59 | print("{0} % {1} = {2}". format(sayi1,sayi2,yuzde))
|
32 | 60 | else:
|
33 | 61 | print("Geçersiz İşlem")
|
|
43 | 71 | elif command=="web-site":
|
44 | 72 | print("linuxuserslinuxmint.github.io")
|
45 | 73 | elif command=="ver":
|
46 |
| - print("Sürüm: 0.2 (Son Güncellenme Tarihi 17 Eylül , 2023 , 14:43)") |
| 74 | + print("Sürüm: 0.2.5 (Son Güncellenme Tarihi 1 Ekim , 2023 , 16:46)") |
47 | 75 | elif command=="licence":
|
48 | 76 | print("This Software is protected under the GPL2 license")
|
49 | 77 | else:
|
|
0 commit comments