@@ -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
5454def 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):
8387NOTE3: 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.
8488SUGGESTION: 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 )
0 commit comments