kececinumbers 0.5.7__tar.gz → 0.5.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {kececinumbers-0.5.7/kececinumbers.egg-info → kececinumbers-0.5.9}/PKG-INFO +1 -1
- {kececinumbers-0.5.7 → kececinumbers-0.5.9}/kececinumbers/__init__.py +1 -1
- {kececinumbers-0.5.7 → kececinumbers-0.5.9}/kececinumbers/_version.py +1 -1
- {kececinumbers-0.5.7 → kececinumbers-0.5.9}/kececinumbers/kececinumbers.py +37 -19
- {kececinumbers-0.5.7 → kececinumbers-0.5.9/kececinumbers.egg-info}/PKG-INFO +1 -1
- {kececinumbers-0.5.7 → kececinumbers-0.5.9}/pyproject.toml +1 -1
- {kececinumbers-0.5.7 → kececinumbers-0.5.9}/LICENSE +0 -0
- {kececinumbers-0.5.7 → kececinumbers-0.5.9}/MANIFEST.in +0 -0
- {kececinumbers-0.5.7 → kececinumbers-0.5.9}/README.md +0 -0
- {kececinumbers-0.5.7 → kececinumbers-0.5.9}/docs/conf.py +0 -0
- {kececinumbers-0.5.7 → kececinumbers-0.5.9}/kececinumbers.egg-info/SOURCES.txt +0 -0
- {kececinumbers-0.5.7 → kececinumbers-0.5.9}/kececinumbers.egg-info/dependency_links.txt +0 -0
- {kececinumbers-0.5.7 → kececinumbers-0.5.9}/kececinumbers.egg-info/requires.txt +0 -0
- {kececinumbers-0.5.7 → kececinumbers-0.5.9}/kececinumbers.egg-info/top_level.txt +0 -0
- {kececinumbers-0.5.7 → kececinumbers-0.5.9}/setup.cfg +0 -0
- {kececinumbers-0.5.7 → kececinumbers-0.5.9}/setup.py +0 -0
- {kececinumbers-0.5.7 → kececinumbers-0.5.9}/tests/test_sample.py +0 -0
@@ -572,6 +572,10 @@ def unified_generator(kececi_type: int, start_input_raw: str, add_input_raw: str
|
|
572
572
|
raise ValueError(f"Invalid Keçeci Number Type: {kececi_type}. Must be between {TYPE_POSITIVE_REAL} and {TYPE_NEUTROSOPHIC_BICOMPLEX}.")
|
573
573
|
|
574
574
|
# --- 1. Değişkenlerin Başlatılması ---
|
575
|
+
# Varsayılan bölme türünü ondalıklı olarak ayarla.
|
576
|
+
# Tamsayı tipleri (POSITIVE/NEGATIVE_REAL) bu değeri kendi blokları içinde ezecektir.
|
577
|
+
use_integer_division = False
|
578
|
+
|
575
579
|
try:
|
576
580
|
# Her sayı tipi, kendi `elif` bloğu içinde kendi girdisini işler.
|
577
581
|
if kececi_type in [TYPE_POSITIVE_REAL, TYPE_NEGATIVE_REAL]:
|
@@ -735,52 +739,66 @@ def get_with_params(kececi_type_choice: int, iterations: int, start_value_raw: s
|
|
735
739
|
return generated_sequence
|
736
740
|
|
737
741
|
def get_interactive() -> Tuple[List[Any], Dict[str, Any]]:
|
738
|
-
"""
|
739
|
-
|
742
|
+
"""
|
743
|
+
Interactively gets parameters from the user to generate a Keçeci Numbers sequence.
|
744
|
+
This version is improved for code clarity and compatibility with the module's
|
745
|
+
current interface.
|
746
|
+
"""
|
747
|
+
print("\n--- Keçeci Numbers Interactive Generator ---")
|
740
748
|
print(" 1: Positive Real 2: Negative Real 3: Complex")
|
741
749
|
print(" 4: Float 5: Rational 6: Quaternion")
|
742
750
|
print(" 7: Neutrosophic 8: Neutro-Complex 9: Hyperreal")
|
743
751
|
print(" 10: Bicomplex 11: Neutro-Bicomplex")
|
744
752
|
|
753
|
+
# Get a valid number type from the user
|
745
754
|
while True:
|
746
755
|
try:
|
747
|
-
type_choice = int(input("Select Keçeci Number Type (1-11): "))
|
756
|
+
type_choice = int(input("Select a Keçeci Number Type (1-11): "))
|
748
757
|
if 1 <= type_choice <= 11:
|
749
758
|
break
|
750
759
|
print("Invalid type. Please enter a number between 1 and 11.")
|
751
760
|
except ValueError:
|
752
761
|
print("Invalid input. Please enter a number.")
|
753
762
|
|
754
|
-
prompts
|
763
|
+
# User prompts for the starting value
|
764
|
+
start_prompts = {
|
755
765
|
1: "Enter positive integer start (e.g., '10'): ",
|
756
766
|
2: "Enter negative integer start (e.g., '-5'): ",
|
757
|
-
3: "Enter complex start (e.g., '3+4j'
|
767
|
+
3: "Enter complex start (e.g., '3+4j'): ",
|
758
768
|
4: "Enter float start (e.g., '3.14'): ",
|
759
|
-
5: "Enter rational start (e.g., '7/2'
|
760
|
-
6: "Enter quaternion (e.g., '1
|
761
|
-
7: "Enter neutrosophic start (e.g., '5+2I'
|
769
|
+
5: "Enter rational start (e.g., '7/2'): ",
|
770
|
+
6: "Enter quaternion start (in 'w,x,y,z' format, e.g., '1.0,2.0,-3.0,1.0'): ",
|
771
|
+
7: "Enter neutrosophic start (e.g., '5+2I'): ",
|
762
772
|
8: "Enter complex base for neutro-complex (e.g., '1-2j'): ",
|
763
|
-
9: "Enter hyperreal start (e.g., '5+3e'
|
773
|
+
9: "Enter hyperreal start (e.g., '5+3e'): ",
|
764
774
|
10: "Enter complex base for bicomplex (e.g., '2+1j'): ",
|
765
775
|
11: "Enter complex base for neutro-bicomplex (e.g., '1+2j'): "
|
766
776
|
}
|
767
777
|
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
778
|
+
# User prompts for the increment value
|
779
|
+
add_prompts = {
|
780
|
+
TYPE_QUATERNION: "Enter quaternion increment (in 'w,x,y,z' format, e.g., '1.3,-2.1,0.5,3.4'): "
|
781
|
+
}
|
782
|
+
default_add_prompt = "Enter increment value (e.g., '9.0'): "
|
783
|
+
|
784
|
+
# Get inputs from the user
|
785
|
+
start_input_val_raw = input(start_prompts.get(type_choice, "Enter starting value: "))
|
786
|
+
add_input_val_raw = input(add_prompts.get(type_choice, default_add_prompt))
|
776
787
|
num_kececi_steps = int(input("Enter number of Keçeci steps (e.g., 15): "))
|
777
788
|
|
778
|
-
sequence
|
789
|
+
# Generate the sequence with the correct parameter names and values
|
790
|
+
sequence = get_with_params(
|
791
|
+
kececi_type_choice=type_choice,
|
792
|
+
iterations=num_kececi_steps,
|
793
|
+
start_value_raw=start_input_val_raw,
|
794
|
+
add_value_raw=add_input_val_raw
|
795
|
+
)
|
779
796
|
|
797
|
+
# Gather the parameters in a dictionary to return
|
780
798
|
params = {
|
781
799
|
"type_choice": type_choice,
|
782
800
|
"start_val": start_input_val_raw,
|
783
|
-
"add_val":
|
801
|
+
"add_val": add_input_val_raw,
|
784
802
|
"steps": num_kececi_steps
|
785
803
|
}
|
786
804
|
return sequence, params
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|