Skip to content

Commit bc1f5c5

Browse files
Major Update.
Signed-off-by: LinuxUsersLinuxMint <143949134+LinuxUsersLinuxMint@users.noreply.github.com>
1 parent f9d9539 commit bc1f5c5

File tree

4 files changed

+273
-0
lines changed

4 files changed

+273
-0
lines changed

Lang/lang.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/python3
2+
""" Copyright© 2023-2025 LinuxUsersLinuxMint
3+
LinuxUsersLinuxMint Calcutator-Lite Tüm Hakları GPL(Genel Kamu Lisansı) altında korunmaktadır.
4+
LinuxUsersLinuxMint Calcutator-Lite All Rights Reserved under the GPL(General Public License).
5+
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-Lite
6+
A Copy of This Software is published on GITHUB To view: https://github.com/LinuxUsersLinuxMint/LinuxUsersLinuxMint-Calcutator-Lite"""
7+
8+
about = "LinuxUsersLinuxMint-Calculator-Lite 2.2"
9+
lang=input("Language: ")
10+
11+
if lang == "tr" or lang == "TR":
12+
error_dialog="Geçersiz işlem!"
13+
process_list = "calc> Girebileceğiniz işlemler: "
14+
process = "toplama\nçıkarma\nçarpma\nbölme\nyüzde hesaplama\nmod alma\nçıkış\nhakkında\n1,2,3,4,5,6,7,8"
15+
usr_input_n1 = "calc> 1. sayiyi giriniz: "
16+
usr_input_n2 = "calc> 2. sayiyi giriniz: "
17+
process_input = "calc> Gerçekleştirmek İstediğiniz İşlemi Giriniz: "
18+
div_err = "Bölme işleminde sayı 0 olamaz!"
19+
elif lang == "en" or lang == "EN":
20+
error_dialog="Invalid Process!"
21+
process_list = "calc> Transactions you can enter: "
22+
process = "Addition\nSubraction\nMultiplication\nDivision\nPercentage\nMod\nexit\nabout\n1,2,3,4,5,6,7,8"
23+
usr_input_n1 = "calc> Enter the 1st number: "
24+
usr_input_n2 = "calc> Enter the 2nd number: "
25+
process_input = "calc> Enter the Transaction You Want to Perform: "
26+
div_err = "Number cannot be 0 when dividing!"
27+
else:
28+
print("Invalid Language!")

Lib/Basic_Maths.py

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
#!/usr/bin/python3
2+
""" Copyright© 2023-2025 LinuxUsersLinuxMint
3+
Basic_Maths Tüm Hakları GPL(Genel Kamu Lisansı) altında korunmaktadır.
4+
Basic_Maths All Rights Reserved under the GPL(General Public License).
5+
Bu Yazılımın Bir Kopyası GİTHUB da yayınlanmaktadır Görüntülemek için: https://github.com/LinuxUsersLinuxMint/Basic_Maths
6+
A Copy of This Software is published on GITHUB To view: https://github.com/LinuxUsersLinuxMint/Basic_Maths"""
7+
8+
from math import *
9+
10+
""" TR (Turkish / Türkçe):
11+
NOT: InputN1N2() sadece 2 sayının istendiği durumlarda kullanılabilir.
12+
13+
EN (English / İngilizce):
14+
NOTE: InputN1N2() can be used when only 2 numbers are required. """
15+
16+
def InputN1N2(number_one_dialog,number_two_dialog):
17+
global number_one, number_two
18+
number_one = float(input("{0}". format(number_one_dialog)))
19+
number_two = float(input("{0}". format(number_two_dialog)))
20+
21+
select_func = str()
22+
"""
23+
Example:
24+
25+
input_select = str(input('Which process?'))
26+
select_func = input_select
27+
28+
def Addition(x,y,ResultDialog):
29+
result=x+y
30+
print("{0} {1} {2} + {3} = {4}". format(select_func,ResultDialog,x,y,result))
31+
32+
"""
33+
34+
def Addition(x,y,ResultDialog):
35+
result=x+y
36+
print("{0} {1} {2} + {3} = {4}". format(select_func,ResultDialog,x,y,result))
37+
38+
def Extraction(x,y,ResultDialog):
39+
result=x-y
40+
print("{0} {1} {2} - {3} = {4}". format(select_func,ResultDialog,x,y,result))
41+
42+
def Multiplication(x,y,ResultDialog):
43+
result=x*y
44+
print("{0} {1} {2} * {3} = {4}". format(select_func,ResultDialog,x,y,result))
45+
46+
def Division(x,y,ResultDialog,check_zero_control_msg):
47+
if x==0 or y==0:
48+
print(check_zero_control_msg)
49+
if y>0 and x>0:
50+
result=x/y
51+
print("{0} {1} {2} / {3} = {4}". format(select_func,ResultDialog,x,y,result))
52+
53+
def Percentage(x,y,ResultDialog):
54+
result = (x*y)/100
55+
print("{0} {1} ({2} * {3})/100 = {4}". format(select_func,ResultDialog,x,y,result))
56+
57+
def Mod(x,y,ResultDialog):
58+
result=x%y
59+
print("{0} {1} {2} % {3} = {4}". format(select_func,ResultDialog,x,y,result))
60+
61+
def FullDivision(x,y,ResultDialog):
62+
result=x//y
63+
print("{0} {1} {2} // {3} = {4}". format(select_func,ResultDialog,x,y,result))
64+
65+
def TakingExponents(x,y,ResultDialog):
66+
result=x ** y
67+
print("{0} {1} {2} ** {3} = {4}". format(select_func,ResultDialog,x,y,result))
68+
69+
def TakingRoots(x,y,ResultDialog):
70+
result=x ** (1/y)
71+
print("{0} {1} {2} / (1/{3}) = {4}". format(select_func,ResultDialog,x,y,result))
72+
73+
def SqaureRoot(x,ResultDialog):
74+
result=x ** (1/2)
75+
print("{0} {1} {2} ** (1/2) = {3}". format(select_func,ResultDialog,x,result))
76+
77+
""" TR (Turkish / Türkçe):
78+
NOT: "Basic_Maths" kütüphanesini kullanan geliştiriciler programlarındaki ihtiyaçlara göre "Basic_Maths" fonksiyonlarını değiştirebilirler.
79+
NOT2: "select_process" değişkeni ile geliştiriciler isteğe bağlı olarak programlarında kullanıcılar tarafından seçilen işlemi gösterebilir.
80+
NOT3: "nod" ve "ntd" değişkenleri ile beraber geliştiriciler "all_math_operations()" fonksiyonunda "InputN1N2()" fonksiyonunu kullanabilir ve bu değişkenler aracılığıyla 1. sayı ve 2. sayı diyaloglarını ekleyebilirler.
81+
ÖNERİ: Eğer istekleriniz veya ihtiyaçlarınız farklıysa "all_math_operations()" fonksiyonunu kullanmadan önce ihtiyaçlarınız doğrultusunda değiştirmeniz önerilir.
82+
83+
EN (English / İngilizce):
84+
NOTE: Developers using the "Basic_Maths" library can change the "Basic_Maths" functions according to the needs of their programs.
85+
NOTE2: With the "select_process" variable, developers can optionally display the process selected by users in their programs.
86+
NOTE3: Along with the "nod" and "ntd" variables, developers can use the "InputN1N2()" function in the "all_math_operations()" function and add the 1st issue and 2nd issue dialogs through these variables.
87+
SUGGESTION: If your wishes or needs are different, it is recommended that you change it according to your needs before using the "all_math_operations()" function. """
88+
89+
def all_math_operations(optDialog,first_opt_dialog,second_opt_dialog,third_opt_dialog,fourth_opt_dialog,fifth_opt_dialog,sixth_opt_dialog,seventh_opt_dialog,eighth_opt_dialog,ninth_opt_dialog,tenth_opt_dialog,SelectOptDialog,nod,ntd,resdialog,divisionzerocheckdialog,errdg,addition_options_one,addition_options_two,addition_options_three,addition_options_four,addition_options_five,extraction_options_one,extraction_options_two,extraction_options_three,extraction_options_four,extraction_options_five,multiplication_options_one,multiplication_options_two,multiplication_options_three,multiplication_options_four,multiplication_options_five,division_options_one,division_options_two,division_options_three,division_options_four,division_options_five,percentage_options_one,percentage_options_two,percentage_options_three,percentage_options_four,percentage_options_five,fulldivision_options_one,fulldivision_options_two,fulldivision_options_three,fulldivision_options_four,fulldivision_options_five,takingexponents_options_one,takingexponents_options_two,takingexponents_options_three,takingexponents_options_four,takingexponents_options_five,takingroots_options_one,takingroots_options_two,takingroots_options_three,takingroots_options_four,takingroots_options_five,squareroot_options_one,squareroot_options_two,squareroot_options_three,squareroot_options_four,squareroot_options_five,mod_options_one,mod_options_two,mod_options_three,mod_options_four,mod_options_five):
90+
print(optDialog)
91+
print(first_opt_dialog)
92+
print(second_opt_dialog)
93+
print(third_opt_dialog)
94+
print(fourth_opt_dialog)
95+
print(fifth_opt_dialog)
96+
print(sixth_opt_dialog)
97+
print(seventh_opt_dialog)
98+
print(eighth_opt_dialog)
99+
print(ninth_opt_dialog)
100+
print(tenth_opt_dialog)
101+
select_func = str(input(SelectOptDialog))
102+
InputN1N2(nod,ntd)
103+
if select_func == addition_options_one or select_func == addition_options_two or select_func == addition_options_three or select_func == addition_options_four or select_func == addition_options_five:
104+
Addition(number_one,number_two,resdialog)
105+
elif select_func == extraction_options_one or select_func == extraction_options_two or select_func == extraction_options_three or select_func == extraction_options_four or select_func == extraction_options_five:
106+
Extraction(number_one,number_two,resdialog)
107+
elif select_func == multiplication_options_one or select_func == multiplication_options_two or select_func == multiplication_options_three or select_func == multiplication_options_four or select_func == multiplication_options_five:
108+
Multiplication(number_one,number_two,resdialog)
109+
elif select_func == division_options_one or select_func == division_options_two or select_func == division_options_three or select_func == division_options_four or select_func == division_options_five:
110+
Division(number_one,number_two,resdialog,divisionzerocheckdialog)
111+
elif select_func == percentage_options_one or select_func == percentage_options_two or select_func == percentage_options_three or select_func == percentage_options_four or select_func == percentage_options_five:
112+
Percentage(number_one,number_two,resdialog)
113+
elif select_func == fulldivision_options_one or select_func == fulldivision_options_two or select_func == fulldivision_options_three or select_func == fulldivision_options_four or select_func == fulldivision_options_five:
114+
FullDivision(number_one,number_two,resdialog)
115+
elif select_func == takingexponents_options_one or select_func == takingexponents_options_two or select_func == takingexponents_options_three or select_func == takingexponents_options_four or select_func == takingexponents_options_five:
116+
TakingExponents(number_one,number_two,resdialog)
117+
elif select_func == takingroots_options_one or select_func == takingroots_options_two or select_func == takingroots_options_three or select_func == takingroots_options_four or select_func == takingroots_options_five:
118+
TakingRoots(number_one,number_two,resdialog)
119+
elif select_func == squareroot_options_one or select_func == squareroot_options_two or select_func == squareroot_options_three or select_func == squareroot_options_four or select_func == squareroot_options_five:
120+
SqaureRoot(number_one,resdialog)
121+
elif select_func == mod_options_one or select_func == mod_options_two or select_func == mod_options_three or select_func == mod_options_four or select_func == mod_options_five:
122+
Mod(number_one,number_two,resdialog)
123+
else:
124+
print(errdg)

Lib/pyappdevkit.py

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
#!/usr/bin/python3
2+
""" Copyright© 2023-2025 LinuxUsersLinuxMint
3+
PyAppDevKit Tüm Hakları GPL(Genel Kamu Lisansı) altında korunmaktadır.
4+
PyAppDevKit All Rights Reserved under the GPL(General Public License).
5+
Bu Yazılımın Bir Kopyası GİTHUB da yayınlanmaktadır Görüntülemek için: https://github.com/LinuxUsersLinuxMint/PyAppDevKit
6+
A Copy of This Software is published on GITHUB To view: https://github.com/LinuxUsersLinuxMint/PyAppDevKit"""
7+
8+
def time(number):
9+
while number > 0:
10+
number -= 1
11+
for _ in range(100000000):
12+
pass
13+
14+
def error_msg(error_dialog,error_code,support_link):
15+
print(error_dialog,error_code,support_link)
16+
17+
def exit_program_dialog_time(exit_dialog_msg,userTime):
18+
print(exit_dialog_msg)
19+
time(userTime)
20+
exit()
21+
22+
def exit_program_time(userTime):
23+
time(userTime)
24+
exit()
25+
26+
def exit_program_dialog(exit_dialog_msg):
27+
print(exit_dialog_msg)
28+
exit()
29+
30+
""" Example Dialog (ExitSelectDialog): "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)): "
31+
Example Dialog (userTimeDialog): "After how many seconds should the program be closed?: "
32+
Example Dialog (exitDialog): "Exit program..."
33+
Example Dialog (errormsgDialog): "Invalid Command!" """
34+
35+
def all_exit(ExitSelectDialog,userTimeDialog,exitDialog,errormsgDialog):
36+
exit_select = int(input(ExitSelectDialog))
37+
exit_select = int(exit_select)
38+
if exit_select == 0:
39+
userTime = int(input(userTimeDialog))
40+
exit_program_dialog_time(exitDialog, userTime)
41+
elif exit_select == 1:
42+
userTime = int(input(userTimeDialog))
43+
exit_program_time(userTime)
44+
elif exit_select == 2:
45+
exit_program_dialog(exitDialog)
46+
elif exit_select == 3:
47+
exit()
48+
else:
49+
print(errormsgDialog)
50+
51+
def program_info(dialog_one,dialog_one_t,dialog_two,dialog_two_t,dialog_three,dialog_three_t,dialog_four,dialog_four_t,dialog_five,dialog_five_t,dialog_six,dialog_six_t,dialog_seven,dialog_seven_t,dialog_eigth,dialog_eight_t,dialog_nine,dialog_nine_t,dialog_ten,dialog_ten_t):
52+
print("{0} {1}". format(dialog_one,dialog_one_t))
53+
print("{0} {1}". format(dialog_two,dialog_two_t))
54+
print("{0} {1}". format(dialog_three,dialog_three_t))
55+
print("{0} {1}". format(dialog_four,dialog_four_t))
56+
print("{0} {1}". format(dialog_five,dialog_five_t))
57+
print("{0} {1}". format(dialog_six,dialog_six_t))
58+
print("{0} {1}". format(dialog_seven,dialog_seven_t))
59+
print("{0} {1}". format(dialog_eigth,dialog_eight_t))
60+
print("{0} {1}". format(dialog_nine,dialog_nine_t))
61+
print("{0} {1}". format(dialog_ten,dialog_ten_t))
62+
63+
def library_info(dialog_one,dialog_one_t,dialog_two,dialog_two_t,dialog_three,dialog_three_t,dialog_four,dialog_four_t,dialog_five,dialog_five_t,dialog_six,dialog_six_t,dialog_seven,dialog_seven_t,dialog_eigth,dialog_eight_t,dialog_nine,dialog_nine_t,dialog_ten,dialog_ten_t):
64+
print("{0} {1}". format(dialog_one,dialog_one_t))
65+
print("{0} {1}". format(dialog_two,dialog_two_t))
66+
print("{0} {1}". format(dialog_three,dialog_three_t))
67+
print("{0} {1}". format(dialog_four,dialog_four_t))
68+
print("{0} {1}". format(dialog_five,dialog_five_t))
69+
print("{0} {1}". format(dialog_six,dialog_six_t))
70+
print("{0} {1}". format(dialog_seven,dialog_seven_t))
71+
print("{0} {1}". format(dialog_eigth,dialog_eight_t))
72+
print("{0} {1}". format(dialog_nine,dialog_nine_t))
73+
print("{0} {1}". format(dialog_ten,dialog_ten_t))
74+
75+
def program_welcome_msg(welcome_msg,cfg,cfg_,appname,libname,websitelink):
76+
print(welcome_msg)
77+
if cfg == 1:
78+
print(websitelink)
79+
elif cfg == 0:
80+
if cfg_ == "lib":
81+
library_info("Library Name: ",libname,"","","","","","","","","","","","","","","","","","")
82+
elif cfg_ == "app":
83+
program_info("Program Name: ",appname,"","","","","","","","","","","","","","","","","","")
84+
else:
85+
error_msg("Invalid definition!","","")

calc.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/usr/bin/python3
2+
""" Copyright© 2023-2025 LinuxUsersLinuxMint
3+
LinuxUsersLinuxMint Calcutator-Lite Tüm Hakları GPL(Genel Kamu Lisansı) altında korunmaktadır.
4+
LinuxUsersLinuxMint Calcutator-Lite All Rights Reserved under the GPL(General Public License).
5+
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-Lite
6+
A Copy of This Software is published on GITHUB To view: https://github.com/LinuxUsersLinuxMint/LinuxUsersLinuxMint-Calcutator-Lite"""
7+
8+
from Lang.lang import *
9+
from Lib.Basic_Maths import *
10+
from Lib.pyappdevkit import *
11+
12+
while True:
13+
print(process_list)
14+
print(process)
15+
n1=int(input(usr_input_n1))
16+
n2=int(input(usr_input_n2))
17+
process_inp=input(process_input)
18+
19+
if process_inp == "1":
20+
Addition(n1,n2,"")
21+
elif process_inp == "2":
22+
Extraction(n1,n2,"")
23+
elif process_inp == "3":
24+
Multiplication(n1,n2,"")
25+
elif process_inp == "4":
26+
Division(n1,n2,"",div_err)
27+
elif process_inp == "5":
28+
Percentage(n1,n2,"")
29+
elif process_inp == "6":
30+
Mod(n1,n2,"")
31+
elif process_inp == "7":
32+
exit_program_time(10)
33+
elif process_inp == "8":
34+
print(about)
35+
else:
36+
error_msg(error_dialog,"","")

0 commit comments

Comments
 (0)