Skip to content

Commit 54df966

Browse files
Important Update.
1 parent 1ac0362 commit 54df966

File tree

4 files changed

+24
-6
lines changed

4 files changed

+24
-6
lines changed

EN/Basic_Maths.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ def Division(x,y,ResultDialog,check_zero_control_msg):
5252
print("{0} {1} {2} / {3} = {4}". format(select_func,ResultDialog,x,y,result))
5353

5454
def Percentage(x,y,ResultDialog):
55+
result = (x*y)/100
56+
print("{0} {1} ({2} * {3})/100 = {4}". format(select_func,ResultDialog,x,y,result))
57+
58+
def Mod(x,y,ResultDialog):
5559
result=x%y
5660
print("{0} {1} {2} % {3} = {4}". format(select_func,ResultDialog,x,y,result))
5761

@@ -83,7 +87,7 @@ def SqaureRoot(x,ResultDialog):
8387
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.
8488
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. """
8589

86-
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,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):
90+
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):
8791
print(optDialog)
8892
print(first_opt_dialog)
8993
print(second_opt_dialog)
@@ -94,6 +98,7 @@ def all_math_operations(optDialog,first_opt_dialog,second_opt_dialog,third_opt_d
9498
print(seventh_opt_dialog)
9599
print(eighth_opt_dialog)
96100
print(ninth_opt_dialog)
101+
print(tenth_opt_dialog)
97102
select_func = str(input(SelectOptDialog))
98103
InputN1N2(nod,ntd)
99104
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:
@@ -113,6 +118,8 @@ def all_math_operations(optDialog,first_opt_dialog,second_opt_dialog,third_opt_d
113118
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:
114119
TakingRoots(number_one,number_two,resdialog)
115120
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:
116-
SqaureRoot(number_one,resdialog)
121+
SqaureRoot(number_one,resdialog)
122+
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:
123+
Mod(number_one,number_two,resdialog)
117124
else:
118125
error_msg(errdg)

EN/calc.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
error_dialog = "Invalid Process!"
1212

1313
print("calc> Transactions you can enter: ")
14-
print("Addition\nSubraction\nMultiplication\nDivision\nPercentage\n1,2,3,4")
14+
print("Addition\nSubraction\nMultiplication\nDivision\nPercentage\n1,2,3,4,5,6")
1515
n1=float(input('{0} Enter The 1st Number: '. format(cmd)))
1616
n2=float(input('{0} Enter The 2st Number: '. format(cmd)))
1717
process=input('{0} Enter the Transaction You Want to Perform: '. format(cmd))
@@ -25,5 +25,7 @@
2525
Division(n1,n2,"","Number cannot be 0 when dividing!")
2626
elif process=="5":
2727
Percentage(n1,n2)
28+
elif process=="6":
29+
Mod(s1,s2)
2830
else:
2931
error_msg(error_dialog)

TR/Basic_Maths.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ def Division(x,y,ResultDialog,check_zero_control_msg):
5252
print("{0} {1} {2} / {3} = {4}". format(select_func,ResultDialog,x,y,result))
5353

5454
def Percentage(x,y,ResultDialog):
55+
result = (x*y)/100
56+
print("{0} {1} ({2} * {3})/100 = {4}". format(select_func,ResultDialog,x,y,result))
57+
58+
def Mod(x,y,ResultDialog):
5559
result=x%y
5660
print("{0} {1} {2} % {3} = {4}". format(select_func,ResultDialog,x,y,result))
5761

@@ -83,7 +87,7 @@ def SqaureRoot(x,ResultDialog):
8387
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.
8488
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. """
8589

86-
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,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):
90+
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):
8791
print(optDialog)
8892
print(first_opt_dialog)
8993
print(second_opt_dialog)
@@ -94,6 +98,7 @@ def all_math_operations(optDialog,first_opt_dialog,second_opt_dialog,third_opt_d
9498
print(seventh_opt_dialog)
9599
print(eighth_opt_dialog)
96100
print(ninth_opt_dialog)
101+
print(tenth_opt_dialog)
97102
select_func = str(input(SelectOptDialog))
98103
InputN1N2(nod,ntd)
99104
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:
@@ -113,6 +118,8 @@ def all_math_operations(optDialog,first_opt_dialog,second_opt_dialog,third_opt_d
113118
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:
114119
TakingRoots(number_one,number_two,resdialog)
115120
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:
116-
SqaureRoot(number_one,resdialog)
121+
SqaureRoot(number_one,resdialog)
122+
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:
123+
Mod(number_one,number_two,resdialog)
117124
else:
118125
error_msg(errdg)

TR/calc.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
error_dialog = "Geçersiz İşlem!"
1212

1313
print("calc> Girebileceğiniz işlemler: ")
14-
print("toplama\nçıkarma\nçarpma\nbölme\nmod alma\n1,2,3,4,5")
14+
print("toplama\nçıkarma\nçarpma\nbölme\nyüzde hesaplama\nmod alma\n1,2,3,4,5,6")
1515
s1=float(input('{0} 1. sayiyi giriniz: '. format(cmd)))
1616
s2=float(input('{0} 2. sayiyi giriniz: '. format(cmd)))
1717
islem=input('{0} Gerçekleştirmek İstediğiniz İşlemi Giriniz: '. format(cmd))
@@ -25,5 +25,7 @@
2525
Division(s1,s2,"","Bölme işleminde sayı 0 olamaz!")
2626
elif islem=="5":
2727
Percentage(s1,s2)
28+
elif islem=="6":
29+
Mod(s1,s2)
2830
else:
2931
error_msg(error_dialog)

0 commit comments

Comments
 (0)