1
1
#!/usr/bin/python3
2
2
import os
3
3
from colorama import Fore , init
4
+ from Basic_Maths import *
4
5
init (autoreset = True )
5
6
islem = int (0 )
7
+ error_dialog = "Geçersiz İşlem/Komut!"
6
8
""" Copyright© 2023-2024 LinuxUsersLinuxMint
7
- Python Calcutator Tüm Hakları GPL(Genel Kamu Lisansı) altında korunmaktadır.
8
- Python Calcutator All Rights Reserved under the GPL(General Public License).
9
- Bu Yazılımın Bir Kopyası GİTHUB da yayınlanmaktadır Görüntülemek için: https://github.com/LinuxUsersLinuxMint/Python -Calcutator
10
- A Copy of This Software is published on GITHUB To view: https://github.com/LinuxUsersLinuxMint/Python -Calcutator """
11
- print ("******************************************************" )
12
- print ("*** Python -Calcutator 0.3 Programına Hoşgeldiniz ***" )
13
- print ("""*** Seçenekler: ***
14
- *** ***
15
- *** Seçmek istediğiniz Komutu Giriniz... ***
16
- *** ***
17
- *** 1. calc ***
18
- *** 2. about ***
19
- *** 3. exit ***
20
- *** 4. help ***
21
- *** 5. git-address ***
22
- *** 6. ver ***
23
- *** 7. licence ***
24
- *** 8. Thank ***
25
- ******************************************************""" )
9
+ LinuxUsersLinuxMint Calcutator Tüm Hakları GPL(Genel Kamu Lisansı) altında korunmaktadır.
10
+ LinuxUsersLinuxMint Calcutator All Rights Reserved under the GPL(General Public License).
11
+ Bu Yazılımın Bir Kopyası GİTHUB da yayınlanmaktadır Görüntülemek için: https://github.com/LinuxUsersLinuxMint/LinuxUsersLinuxMint -Calcutator
12
+ A Copy of This Software is published on GITHUB To view: https://github.com/LinuxUsersLinuxMint/LinuxUsersLinuxMint -Calcutator """
13
+ print ("********************************************************************* " )
14
+ print ("*** LinuxUsersLinuxMint -Calcutator 0.3.1 Programına Hoşgeldiniz ***" )
15
+ print ("""*** Seçenekler: ***
16
+ *** ***
17
+ *** Seçmek istediğiniz Komutu Giriniz... ***
18
+ *** ***
19
+ *** 1. calc ***
20
+ *** 2. about ***
21
+ *** 3. exit ***
22
+ *** 4. help ***
23
+ *** 5. git-address ***
24
+ *** 6. ver ***
25
+ *** 7. licence ***
26
+ *** 8. Thank ***
27
+ ********************************************************************* """ )
26
28
command = str (input (Fore .LIGHTBLUE_EX + 'calc> ' ))
27
29
os .system ("clear" )
28
30
about = "Python Hesap Makinesi CLI(Komut Satırı Arayüzü) LICENCE=GPL2"
45
47
sayi2 = float (input ('calc> 2. sayiyi giriniz: ' ))
46
48
os .system ("clear" )
47
49
if islem == "1" :
48
- print ( "{0} + {1} = {2}" . format ( sayi1 ,sayi2 ,sayi1 + sayi2 ) )
50
+ addition ( sayi1 ,sayi2 ,"Sonuç: " )
49
51
elif islem == "2" :
50
- print ( "{0} - {1} = {2}" . format ( sayi1 ,sayi2 ,sayi1 - sayi2 ) )
52
+ Extraction ( sayi1 ,sayi2 ,"Sonuç: " )
51
53
elif islem == "3" :
52
- print ( "{0} * {1} = {2}" . format ( sayi1 ,sayi2 ,sayi1 * sayi2 ) )
54
+ Multiplication ( sayi1 ,sayi2 ,"Sonuç: " )
53
55
elif islem == "4" :
54
- print ( "{0} / {1} = {2}" . format ( sayi1 , sayi2 , sayi1 / sayi2 ) )
56
+ Division ( sayi1 , sayi2 , "Sonuç: " , "Bölme işleminde sayılar 0 olamaz!" )
55
57
elif islem == "5" :
56
- print ( "{0} % {1} = {2}" . format ( sayi1 ,sayi2 ,sayi1 % sayi2 ) )
58
+ Percentage ( sayi1 ,sayi2 ,"Sonuç: " )
57
59
else :
58
- print ("Geçersiz İşlem!" )
59
- if command == "about" :
60
- print (about )
61
- elif command == "exit" :
60
+ error_msg ()
61
+ if command == "about" :
62
+ print (about )
63
+ elif command == "exit" :
64
+ exit_select = int (input ('Select the method to exit the program (0: Dialogue and Time entry, 1: Time entry only, 2: Dialogue entry only, 3: Normal exit (old style)): ' ))
65
+ exit_select = int (exit_select )
66
+ if exit_select == 0 :
67
+ userTime = input ('After how many seconds should the program be closed?: ' )
68
+ userTime = int (userTime )
69
+ exit_program_dialog_time ("Exit program..." , userTime )
70
+ elif exit_select == 1 :
71
+ userTime = input ('After how many seconds should the program be closed?: ' )
72
+ userTime = int (userTime )
73
+ exit_program_time (userTime )
74
+ elif exit_select == 2 :
75
+ exit_program_dialog ("Exit program..." )
76
+ elif exit_select == 3 :
62
77
exit ()
63
- elif command == "help" :
64
- print ("Python calc Help" )
65
- print ("\n Command: calc , about , help , exit , git-address , web-site , ver , licence , Thank" )
66
- elif command == "git-address" :
67
- print ("Github Link: https://github.com/LinuxUsersLinuxMint" )
68
- elif command == "web-site" :
69
- print ("linuxuserslinuxmint.github.io" )
70
- elif command == "ver" :
71
- print ("Sürüm: 0.3 (Son Güncellenme Tarihi 8 Mayıs , 2024 , 21:54)" )
72
- elif command == "licence" :
73
- print ("Bu Yazılım GPL2 lisansı kapsamında korunmaktadır." )
74
- elif command == "Thank" :
75
- print ("Python-Calcutator'u Kullandığınız için Teşekkür ederim. " )
76
78
else :
77
- print ("Geçersiz Komut!" )
79
+ error_msg ()
80
+ elif command == "help" :
81
+ print ("Python calc Help" )
82
+ print ("\n Command: calc , about , help , exit , git-address , web-site , ver , licence , Thank" )
83
+ elif command == "git-address" :
84
+ print ("Github Link: https://github.com/LinuxUsersLinuxMint/LinuxUsersLinuxMint-Calcutator" )
85
+ elif command == "web-site" :
86
+ print ("linuxuserslinuxmint.github.io" )
87
+ elif command == "ver" :
88
+ print ("Sürüm: 0.3.1 (Son Güncellenme Tarihi 31 Mayıs , 2024 , 23:30)" )
89
+ elif command == "licence" :
90
+ print ("Bu Yazılım GPL2 lisansı kapsamında korunmaktadır." )
91
+ elif command == "Thank" :
92
+ print ("Python-Calcutator'u Kullandığınız için Teşekkür ederim. " )
93
+ else :
94
+ error_msg ()
0 commit comments