Skip to content

Commit

Permalink
Update Basic_Maths.
Browse files Browse the repository at this point in the history
  • Loading branch information
LinuxUsersLinuxMint committed Jun 2, 2024
1 parent f119e6c commit b90ebc5
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 32 deletions.
43 changes: 33 additions & 10 deletions Basic_Maths/Basic_Maths.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,10 @@
from Basic_Maths.library_func import *
import time

global result,input_dialog,error_dialog
global result,error_dialog

input_dialog = str()
error_dialog = str()

def p(userString):
print(userString)

def error_msg():
p(error_dialog)

Expand All @@ -34,22 +30,49 @@ def exit_program_dialog(exit_dialog_msg):
p(exit_dialog_msg)
exit()

""" 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)): "
# Example Dialog (userTimeDialog): "After how many seconds should the program be closed?: "
# Example Dialog (exitDialog): "Exit program..."
# Example Dialog (errormsgDialog): "Invalid Command!" """

def all_exit(ExitSelectDialog,userTimeDialog,exitDialog,errormsgDialog):
exit_select = int(input(ExitSelectDialog))
exit_select = int(exit_select)
if exit_select == 0:
userTime = input(userTimeDialog)
exit_program_dialog_time(exitDialog, userTime)
elif exit_select == 1:
userTime = input(userTime)
exit_program_time(userTime)
elif exit_select == 2:
exit_program_dialog(exitDialog)
elif exit_select == 3:
exit()
else:
p(errormsgDialog)

def program_welcome_msg(welcome_msg):
p(welcome_msg)

def program_info(programnamedialog,program_name,programversiondialog,program_version,programsupportosdialog,program_support_os,programlicencedialog,program_licence,programauthordialog,program_author,programreleasedatedialog,program_rs_date):
def program_info(programnamedialog,program_name,programversiondialog,program_version,programsupportosdialog,program_support_os,programlicencedialog,program_licence,programauthordialog,program_author,programauthorwebsitedialog,program_author_web_site,programreleasedatedialog,program_rs_date,programlastupdatedatedialog,program_last_update_date):
p("{0} {1}". format(programnamedialog,program_name))
p("{0} {1}". format(programversiondialog,program_version))
p("{0} {1}". format(programsupportosdialog,program_support_os))
p("{0} {1}". format(programlicencedialog,program_licence))
p("{0} {1}". format(programauthordialog,program_author))
p("{0} {1}". format(programauthorwebsitedialog,program_author_web_site))
p("{0} {1}". format(programreleasedatedialog,program_rs_date))

p("{0} {1}". format(programlastupdatedatedialog,program_last_update_date))

# TR (Turkish / Türkçe):
# NOT: InputN1N2() sadece 2 sayının istendiği durumlarda kullanılabilir.
# EN (English / İngilizce):
# NOTE: InputN1N2() can be used when only 2 numbers are required.

def InputN1N2():
def InputN1N2(number_one_dialog,number_two_dialog):
global number_one, number_two
number_one = str(input("{0}". format(input_dialog)))
number_two = str(input("{0}". format(input_dialog)))
number_one = str(input("{0}". format(number_one_dialog)))
number_two = str(input("{0}". format(number_two_dialog)))

select_func = str()
"""
Expand Down
8 changes: 5 additions & 3 deletions Basic_Maths/lib_ver_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@

PYTHON_LIB_NAME="Basic_Maths"
PYTHON_LIB_LICENCE="GPL2"
PYTHON_LIB_VER="3.3"
PYTHON_LIB_VER="3.5"
PYTHON_LIB_SUPPORT_PLATFORM="Windows/Linux/macOS/otherOS"
PYTHON_LIB_RELEASE_DATE="6/1/2024, Time: 16:46"
PYTHON_LIB_AUTHOR="LinuxUsersLinuxMint"
PYTHON_LIB_RELEASE_DATE="9/30/2023, Time: XX:XX"
PYTHON_LIB_LAST_UPDATE_DATE="6/2/2024, Time: 16:46"
PYTHON_LIB_AUTHOR="LinuxUsersLinuxMint"
PYTHON_LIB_AUTHOR_WEB_SITE="https://linuxuserslinuxmint.github.io"
4 changes: 3 additions & 1 deletion Basic_Maths/library_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ def LibAbout():
p("Python Library Support OS: {0}", format(PYTHON_LIB_SUPPORT_PLATFORM))
p("Python Library Licence Name: {0}", format(PYTHON_LIB_LICENCE))
p("Python Library Author Name: {0}", format(PYTHON_LIB_AUTHOR))
p("Python Library Release Date: {0}", format(PYTHON_LIB_RELEASE_DATE))
p("Python Library Author Web Site: {0}", format(PYTHON_LIB_AUTHOR_WEB_SITE))
p("Python Library Release Date: {0}", format(PYTHON_LIB_RELEASE_DATE))
p("Python Library Last Update Date: {0}", format(PYTHON_LIB_LAST_UPDATE_DATE))
3 changes: 1 addition & 2 deletions Example/basic_maths_calc.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@

from ..Basic_Maths.Basic_Maths import *

input_dialog = str("Enter the number: ")
error_dialog = str("Invalid process...")
resultdialog = str("Result:")

InputN1N2()
InputN1N2("Enter the 1st number: ", "Enter the 2nd number: ")

select=print('Select (Add, Ext, Mul, Div, Per, FullDiv, TakeEx): ')

Expand Down
28 changes: 12 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
# Basic_Maths

TR (Turkish / Türkçe):

* Oldukça Basit Python için bir Matematik Kütüphanesi
* Python da Matematik Temel 4 işlemi herhangi bir ek değişken gerektirmeden kullanabilmemizi sağlar
Örnek:
#!/usr/bin/python3
from Basic_Maths import *
addition(5,5)
Çıktı: result: 5 + 5 = 10
* Python için matematik işlemlerini basitleştirir ve kullanımı kolay bir hale getirir.
* Kodlama/geliştirme süresini kısaltır işlerinizi daha hızlı halledebilirsiniz.
* Kodun daha rahat anlaşılmasını sağlar ve daha az satır kod yazmış olursunuz.
* Sürekli güncel kalır bu sayede sürekli yeni özellikler eklenir ve hata varsa bunlar çözülür.
* Geliştiriciler için kolaylık sağlar "Python" ile yazılmış olan programlarda kendi programınız hakkında bilgi verebilmeniz için "program_info()" fonksiyonu bulunur ayrıca "LibAbout()" fonksiyonu ile de "Basic_Maths" kütüphanesi hakkında da bilgi verebilirsiniz.

* A very simple math library for Python
* Math Basic 4 in Python allows us to use operations without requiring any additional variables.
Example:
#!/usr/bin/python3
from Basic_Maths import *
addition(5,5)
Output: result: 5 + 5 = 10
EN (English / İngilizce):

* By: LinuxUsersLinuxMint
* Credits: gaurovgiri @gaurovgiri
* It simplifies math operations for Python and makes it easy to use.
* It shortens the coding/development time and you can get your work done faster.
* It makes the code easier to understand and you write fewer lines of code.
* It remains constantly updated, so new features are constantly added and if there are errors, they are resolved.
* Provides convenience for developers. Programs written in "Python" have the "program_info()" function so that you can provide information about your own program, and you can also provide information about the "Basic_Maths" library with the "LibAbout()" function.

0 comments on commit b90ebc5

Please sign in to comment.