kececinumbers 0.2.1__py3-none-any.whl → 0.2.3__py3-none-any.whl

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/__init__.py CHANGED
@@ -34,4 +34,4 @@ def eski_fonksiyon():
34
34
 
35
35
 
36
36
  # Paket sürüm numarası
37
- __version__ = "0.2.0"
37
+ __version__ = "0.2.3"
kececinumbers/_version.py CHANGED
@@ -1,6 +1,6 @@
1
1
  # _version.py
2
2
 
3
- __version__ = "0.2.0"
3
+ __version__ = "0.2.3"
4
4
  __license__ = "MIT"
5
5
  __description__ = "Keçeci Numbers: An Exploration of a Dynamic Sequence Across Diverse Number Sets."
6
6
  __author__ = "Mehmet Keçeci"
@@ -33,6 +33,7 @@ import matplotlib.pyplot as plt
33
33
  import numpy as np
34
34
  import quaternion # Requires: pip install numpy numpy-quaternion
35
35
  from matplotlib.gridspec import GridSpec
36
+ import re
36
37
 
37
38
  # ==============================================================================
38
39
  # --- MODULE CONSTANTS: KEÇECI NUMBER TYPES ---
@@ -462,22 +463,19 @@ def _is_divisible(value, divisor, kececi_type):
462
463
 
463
464
  def unified_generator(kececi_type, start_input_raw, add_input_base_scalar, iterations):
464
465
  """
465
- The core engine for generating Keçeci Number sequences of any supported type.
466
- This version includes robust type conversion to prevent initialization errors.
466
+ Herhangi bir desteklenen türde Keçeci Sayı dizileri üreten çekirdek motor.
467
+ Bu sürüm, tüm tipler için sağlam tür dönüştürme ve özel format ayrıştırma içerir.
467
468
  """
468
- # --- Step 1: Initialization based on Keçeci Type ---
469
469
  current_value = None
470
470
  add_value_typed = None
471
471
  ask_unit = None
472
472
  use_integer_division = False
473
473
 
474
474
  try:
475
- # Convert the ADD value once, as it's always a scalar float.
475
+ # --- Adım 1: Keçeci Türüne Göre Başlatma ---
476
476
  a_float = float(add_input_base_scalar)
477
477
 
478
- # Handle START value conversion properly within each type-specific block.
479
478
  if kececi_type in [TYPE_POSITIVE_REAL, TYPE_NEGATIVE_REAL]:
480
- # Correctly handle float strings like "2.5" by converting to float first.
481
479
  s_int = int(float(start_input_raw))
482
480
  current_value = s_int
483
481
  add_value_typed = int(a_float)
@@ -490,82 +488,83 @@ def unified_generator(kececi_type, start_input_raw, add_input_base_scalar, itera
490
488
  ask_unit = 1.0
491
489
 
492
490
  elif kececi_type == TYPE_RATIONAL:
493
- # The Fraction constructor correctly handles strings like "2.5".
494
- current_value = Fraction(str(start_input_raw))
495
- add_value_typed = Fraction(str(add_input_base_scalar))
496
- ask_unit = Fraction(1, 1)
491
+ current_value = Fraction(start_input_raw)
492
+ add_value_typed = Fraction(add_input_base_scalar)
493
+ ask_unit = Fraction(1)
497
494
 
498
495
  elif kececi_type == TYPE_COMPLEX:
499
- s_complex = complex(start_input_raw)
500
- # If input was a plain number (e.g., "2.5"), interpret it as s+sj.
501
- if s_complex.imag == 0 and 'j' not in str(start_input_raw).lower():
502
- s_complex = complex(s_complex.real, s_complex.real)
503
- current_value = s_complex
496
+ current_value = _parse_complex(start_input_raw)
504
497
  add_value_typed = complex(a_float, a_float)
505
498
  ask_unit = 1 + 1j
506
499
 
507
- elif kececi_type == TYPE_QUATERNION:
508
- # Explicitly convert the input string to a float before use.
509
- s_float = float(start_input_raw)
510
- current_value = np.quaternion(s_float, s_float, s_float, s_float)
511
- add_value_typed = np.quaternion(a_float, a_float, a_float, a_float)
512
- ask_unit = np.quaternion(1, 1, 1, 1)
513
-
514
500
  elif kececi_type == TYPE_NEUTROSOPHIC:
515
- s_float = float(start_input_raw)
516
- current_value = NeutrosophicNumber(s_float, s_float / 2)
517
- add_value_typed = NeutrosophicNumber(a_float, a_float / 2)
501
+ a, b = _parse_neutrosophic(start_input_raw)
502
+ current_value = NeutrosophicNumber(a, b)
503
+ add_value_typed = NeutrosophicNumber(a_float, 0)
518
504
  ask_unit = NeutrosophicNumber(1, 1)
519
-
520
- elif kececi_type == TYPE_NEUTROSOPHIC_COMPLEX:
521
- s_float = float(start_input_raw)
522
- current_value = NeutrosophicComplexNumber(s_float, s_float / 2, s_float / 3)
523
- add_value_typed = NeutrosophicComplexNumber(a_float, a_float / 2, a_float / 3)
505
+
506
+ # --- YENİ EKLENEN/DÜZELTİLEN BLOKLAR ---
507
+
508
+ elif kececi_type == TYPE_NEUTROSOPHIC_COMPLEX: # HATA DÜZELTİLDİ
509
+ s_complex = _parse_complex(start_input_raw)
510
+ # Başlangıç indeterminacy değerini 0 olarak varsayalım
511
+ current_value = NeutrosophicComplexNumber(s_complex.real, s_complex.imag, 0.0)
512
+ # Artış, deterministik reel kısma etki eder
513
+ add_value_typed = NeutrosophicComplexNumber(a_float, 0.0, 0.0)
524
514
  ask_unit = NeutrosophicComplexNumber(1, 1, 1)
525
-
526
- elif kececi_type == TYPE_HYPERREAL:
527
- s_float = float(start_input_raw)
528
- current_value = HyperrealNumber([s_float / n for n in range(1, 11)])
529
- add_value_typed = HyperrealNumber([a_float / n for n in range(1, 11)])
515
+
516
+ elif kececi_type == TYPE_HYPERREAL: # HATA DÜZELTİLDİ
517
+ a, b = _parse_hyperreal(start_input_raw)
518
+ # 'a' reel kısmı, 'b' ise sonsuz küçükleri ölçekler
519
+ sequence_list = [a + b / n for n in range(1, 11)]
520
+ current_value = HyperrealNumber(sequence_list)
521
+ # Artış, sadece standart (ilk) reel kısma etki eder
522
+ add_sequence = [a_float] + [0.0] * 9
523
+ add_value_typed = HyperrealNumber(add_sequence)
530
524
  ask_unit = HyperrealNumber([1.0] * 10)
531
-
532
- elif kececi_type == TYPE_BICOMPLEX:
533
- s_complex = complex(start_input_raw)
525
+
526
+ elif kececi_type == TYPE_BICOMPLEX: # Mantık aynı, sadece ayrıştırıcıyı kullanıyor
527
+ s_complex = _parse_complex(start_input_raw)
534
528
  a_complex = complex(a_float)
535
529
  current_value = BicomplexNumber(s_complex, s_complex / 2)
536
530
  add_value_typed = BicomplexNumber(a_complex, a_complex / 2)
537
531
  ask_unit = BicomplexNumber(complex(1, 1), complex(0.5, 0.5))
538
532
 
539
- elif kececi_type == TYPE_NEUTROSOPHIC_BICOMPLEX:
533
+ elif kececi_type == TYPE_NEUTROSOPHIC_BICOMPLEX: # HATA DÜZELTİLDİ
534
+ s_complex = _parse_complex(start_input_raw)
535
+ # Başlangıç değeri olarak kompleks sayıyı kullanıp diğer 6 bileşeni 0 yapalım
536
+ current_value = NeutrosophicBicomplexNumber(s_complex.real, s_complex.imag, 0, 0, 0, 0, 0, 0)
537
+ # Artış, sadece ana reel kısma etki eder
538
+ add_value_typed = NeutrosophicBicomplexNumber(a_float, 0, 0, 0, 0, 0, 0, 0)
539
+ ask_unit = NeutrosophicBicomplexNumber(*([1.0] * 8))
540
+
541
+ # --- DİĞER TİPLER ---
542
+
543
+ elif kececi_type == TYPE_QUATERNION:
540
544
  s_float = float(start_input_raw)
541
- parts = [s_float / (n + 1) for n in range(8)]
542
- add_parts = [a_float / (n + 1) for n in range(8)]
543
- ask_parts = [1.0 / (n + 1) for n in range(8)]
544
- current_value = NeutrosophicBicomplexNumber(*parts)
545
- add_value_typed = NeutrosophicBicomplexNumber(*add_parts)
546
- ask_unit = NeutrosophicBicomplexNumber(*ask_parts)
547
-
545
+ current_value = np.quaternion(s_float, s_float, s_float, s_float)
546
+ add_value_typed = np.quaternion(a_float, a_float, a_float, a_float)
547
+ ask_unit = np.quaternion(1, 1, 1, 1)
548
+
548
549
  else:
549
- raise ValueError(f"Invalid Keçeci Number Type: {kececi_type}")
550
+ raise ValueError(f"Geçersiz veya desteklenmeyen Keçeci Sayı Tipi: {kececi_type}")
550
551
 
551
552
  except (ValueError, TypeError) as e:
552
- print(f"Error initializing generator for type {kececi_type} with input '{start_input_raw}': {e}")
553
+ print(f"HATA: Tip {kececi_type} için '{start_input_raw}' girdisiyle başlatma başarısız: {e}")
553
554
  return []
554
555
 
555
- # --- Step 2: Iteration Loop (This part remains unchanged) ---
556
+ # --- Adım 2: İterasyon Döngüsü ---
556
557
  sequence = [current_value]
557
558
  last_divisor_used = None
558
559
  ask_counter = 0
559
560
 
560
561
  for _ in range(iterations):
561
- # Rule 1: Add the increment value
562
562
  added_value = current_value + add_value_typed
563
563
  sequence.append(added_value)
564
564
 
565
565
  result_value = added_value
566
566
  divided_successfully = False
567
567
 
568
- # Rule 2: Attempt Division
569
568
  primary_divisor = 3 if last_divisor_used == 2 or last_divisor_used is None else 2
570
569
  alternative_divisor = 2 if primary_divisor == 3 else 3
571
570
 
@@ -576,16 +575,13 @@ def unified_generator(kececi_type, start_input_raw, add_input_base_scalar, itera
576
575
  divided_successfully = True
577
576
  break
578
577
 
579
- # Rule 3: Apply ASK Rule if division failed and the number is prime
580
578
  if not divided_successfully and is_prime(added_value):
581
- # Augment or Shrink the value
582
579
  modified_value = (added_value + ask_unit) if ask_counter == 0 else (added_value - ask_unit)
583
- ask_counter = 1 - ask_counter # Flip between 0 and 1
580
+ ask_counter = 1 - ask_counter
584
581
  sequence.append(modified_value)
585
582
 
586
- result_value = modified_value # Default to modified value if re-division fails
583
+ result_value = modified_value
587
584
 
588
- # Re-attempt division on the modified value
589
585
  for divisor in [primary_divisor, alternative_divisor]:
590
586
  if _is_divisible(modified_value, divisor, kececi_type):
591
587
  result_value = modified_value // divisor if use_integer_division else modified_value / divisor
@@ -597,6 +593,205 @@ def unified_generator(kececi_type, start_input_raw, add_input_base_scalar, itera
597
593
 
598
594
  return sequence
599
595
 
596
+ def _parse_complex(s: str) -> complex:
597
+ """
598
+ Bir string'i kompleks sayıya çevirir.
599
+ Eğer 'j' içermiyorsa, "3" girdisini 3+3j olarak yorumlar.
600
+ """
601
+ s_clean = s.strip().lower()
602
+ try:
603
+ # Doğrudan kompleks çevirmeyi dene (ör: "3+4j")
604
+ c = complex(s_clean)
605
+ # Eğer girdi "3" gibi sadece reel bir sayıysa ve 'j' içermiyorsa,
606
+ # onu s_complex.real + s_complex.real*j yap.
607
+ if c.imag == 0 and 'j' not in s_clean:
608
+ return complex(c.real, c.real)
609
+ return c
610
+ except ValueError as e:
611
+ raise ValueError(f"Geçersiz kompleks sayı formatı: '{s}'") from e
612
+
613
+ def _parse_neutrosophic(s: str) -> (float, float):
614
+ """
615
+ Parses a neutrosophic number string of the form 'a+bI' into a tuple (a, b).
616
+ Handles cases like '5+2I', '3-I', '7', '4I', '-I'.
617
+ """
618
+ s = s.strip().replace(" ", "").upper()
619
+ if not s:
620
+ return 0.0, 0.0
621
+
622
+ # Eğer 'I' yoksa, bu standart bir sayıdır (b=0)
623
+ if 'I' not in s:
624
+ try:
625
+ return float(s), 0.0
626
+ except ValueError:
627
+ raise ValueError(f"Invalid number format for non-neutrosophic part: {s}")
628
+
629
+ # 'I' varsa, a ve b kısımlarını ayır
630
+ # 'b' kısmını bul
631
+ i_pos = s.find('I')
632
+ a_part_str = s[:i_pos]
633
+
634
+ # Sadece 'I' veya '-I' gibi durumlar
635
+ if not a_part_str or a_part_str == '+':
636
+ b = 1.0
637
+ elif a_part_str == '-':
638
+ b = -1.0
639
+ else:
640
+ # 'a' ve 'b' kısımlarını ayırmak için sondaki işareti bul
641
+ last_plus = a_part_str.rfind('+')
642
+ last_minus = a_part_str.rfind('-')
643
+
644
+ # Eğer başta eksi işareti varsa onu ayraç olarak sayma
645
+ if last_minus == 0 and last_plus == -1:
646
+ split_pos = -1
647
+ else:
648
+ split_pos = max(last_plus, last_minus)
649
+
650
+ if split_pos == -1: # Örneğin '3I' durumu
651
+ a = 0.0
652
+ b = float(a_part_str)
653
+ else: # Örneğin '5+3I' veya '-2-4I' durumu
654
+ a = float(a_part_str[:split_pos])
655
+ b_str = a_part_str[split_pos:]
656
+ if b_str == '+':
657
+ b = 1.0
658
+ elif b_str == '-':
659
+ b = -1.0
660
+ else:
661
+ b = float(b_str)
662
+
663
+ return a, b
664
+
665
+ def _parse_hyperreal(s: str) -> (float, float):
666
+ """
667
+ 'a+be' formatındaki bir hiperreel string'i (a, b) demetine ayrıştırır.
668
+ '5+3e', '-2-e', '10', '4e', '-e' gibi formatları işler.
669
+ """
670
+ s = s.strip().replace(" ", "").lower()
671
+ if not s:
672
+ return 0.0, 0.0
673
+
674
+ # Eğer 'e' yoksa, bu standart bir sayıdır (b=0)
675
+ if 'e' not in s:
676
+ return float(s), 0.0
677
+
678
+ # 'a+be' formatını regex ile ayrıştır
679
+ # Örnekler: 5+3e, -3.1-4.5e, +2e, e, -e
680
+ match = re.match(r"^(?P<a>[+-]?\d+\.?\d*)?(?P<b>[+-]?\d*\.?\d*)e$", s)
681
+ if not match:
682
+ # Sadece +e veya -e durumları için
683
+ match = re.match(r"^(?P<a>[+-]?\d+\.?\d*)?(?P<b>[+-])e$", s)
684
+
685
+ if not match:
686
+ raise ValueError(f"Geçersiz hiperreel format: {s}")
687
+
688
+ parts = match.groupdict()
689
+ a_part = parts.get('a')
690
+ b_part = parts.get('b')
691
+
692
+ a = float(a_part) if a_part else 0.0
693
+
694
+ if b_part is None or b_part == '' or b_part == '+':
695
+ b = 1.0
696
+ elif b_part == '-':
697
+ b = -1.0
698
+ else:
699
+ b = float(b_part)
700
+
701
+ return a, b
702
+
703
+
704
+ def get_random_type(num_iterations, fixed_start_raw="0", fixed_add_base_scalar=9.0):
705
+ """
706
+ Generates Keçeci Numbers for a randomly selected type using fixed parameters.
707
+ (Updated with the full list of 11 types and compatible with the new get_with_params signature)
708
+ """
709
+ # Rastgele sayı üretme aralığı 11 tipe göre güncellendi.
710
+ random_type_choice = random.randint(1, 11)
711
+
712
+ # Kullanıcının sağladığı tam liste eklendi.
713
+ type_names_list = [
714
+ "Positive Real", "Negative Real", "Complex", "Float", "Rational",
715
+ "Quaternion", "Neutrosophic", "Neutro-Complex", "Hyperreal",
716
+ "Bicomplex", "Neutro-Bicomplex"
717
+ ]
718
+
719
+ # Listenin indeksi 0'dan başladığı için random_type_choice-1 kullanılır.
720
+ print(f"\nRandomly selected Keçeci Number Type: {random_type_choice} ({type_names_list[random_type_choice-1]})")
721
+
722
+ # get_with_params fonksiyonu sadeleştirilmiş haliyle çağrılıyor.
723
+ # Beklenmeyen 'random_range_factor' veya 'fixed_params' argümanları yok.
724
+ generated_sequence = get_with_params(
725
+ kececi_type_choice=random_type_choice,
726
+ iterations=num_iterations,
727
+ start_value_raw=fixed_start_raw,
728
+ add_value_base_scalar=fixed_add_base_scalar
729
+ )
730
+
731
+ return generated_sequence
732
+
733
+ def print_detailed_report(sequence, params):
734
+ """
735
+ Generates and prints a detailed report of the Keçeci sequence results.
736
+
737
+ Args:
738
+ sequence (list): The generated Keçeci sequence.
739
+ params (dict): A dictionary containing the generation parameters.
740
+ """
741
+ if not sequence:
742
+ print("\n--- REPORT ---")
743
+ print("Sequence could not be generated. No report to show.")
744
+ return
745
+
746
+ print("\n\n" + "="*50)
747
+ print("--- DETAILED SEQUENCE REPORT ---")
748
+ print("="*50)
749
+
750
+ # Parametreleri yazdır
751
+ print("\n[Parameters Used]")
752
+ print(f" - Keçeci Type: {params['type_name']} ({params['type_choice']})")
753
+ print(f" - Start Value: '{params['start_val']}'")
754
+ print(f" - Increment: {params['add_val']}")
755
+ print(f" - Keçeci Steps: {params['steps']}")
756
+
757
+ # Dizi Özeti
758
+ print("\n[Sequence Summary]")
759
+ print(f" - Total Numbers Generated: {len(sequence)}")
760
+
761
+ # Keçeci Asal Sayısı (KPN) sonucunu bul ve yazdır
762
+ kpn = find_kececi_prime_number(sequence)
763
+ if kpn is not None:
764
+ print(f" - Keçeci Prime Number (KPN): {kpn}")
765
+ else:
766
+ print(" - Keçeci Prime Number (KPN): Not found in this sequence.")
767
+
768
+ # Dizi Önizlemesi
769
+ print("\n[Sequence Preview]")
770
+ # Dizinin tamamını yazdırmadan önce bir önizleme sunalım
771
+ preview_count = min(len(sequence), 5)
772
+ print(f" --- First {preview_count} Numbers ---")
773
+ for i in range(preview_count):
774
+ print(f" {i}: {sequence[i]}")
775
+
776
+ if len(sequence) > preview_count:
777
+ print(f"\n --- Last {preview_count} Numbers ---")
778
+ for i in range(len(sequence) - preview_count, len(sequence)):
779
+ print(f" {i}: {sequence[i]}")
780
+
781
+ print("\n" + "="*50)
782
+
783
+ # Kullanıcıya tüm diziyi görmek isteyip istemediğini sor
784
+ while True:
785
+ show_all = input("Do you want to print the full sequence? (y/n): ").lower().strip()
786
+ if show_all in ['y', 'n']:
787
+ break
788
+
789
+ if show_all == 'y':
790
+ print("\n--- FULL SEQUENCE ---")
791
+ for i, num in enumerate(sequence):
792
+ print(f"{i}: {num}")
793
+ print("="*50)
794
+
600
795
  # ==============================================================================
601
796
  # --- HIGH-LEVEL CONTROL FUNCTIONS ---
602
797
  # ==============================================================================
@@ -630,6 +825,7 @@ def get_with_params(kececi_type_choice, iterations, start_value_raw="0", add_val
630
825
  def get_interactive():
631
826
  """
632
827
  Interactively gets parameters from the user and generates Keçeci Numbers.
828
+ This version only gets data and returns the sequence without plotting.
633
829
  """
634
830
  print("\n--- Keçeci Number Interactive Generator ---")
635
831
  print(" 1: Positive Real 2: Negative Real 3: Complex")
@@ -644,18 +840,38 @@ def get_interactive():
644
840
  else: print("Invalid type. Please enter a number between 1 and 11.")
645
841
  except ValueError: print("Invalid input. Please enter a number.")
646
842
 
647
- start_prompt = "Enter starting value: "
648
- if type_choice == TYPE_COMPLEX: start_prompt = "Enter complex start (e.g., '3+4j' or '3' for 3+3j): "
649
- elif type_choice == TYPE_RATIONAL: start_prompt = "Enter rational start (e.g., '7/2' or '5'): "
650
- elif type_choice == TYPE_BICOMPLEX: start_prompt = "Enter bicomplex start (complex, e.g., '2+1j'): "
843
+ # Her tip için özel başlangıç değeri istemleri (prompts)
844
+ prompts = {
845
+ 1: "Enter positive integer start (e.g., '10'): ",
846
+ 2: "Enter negative integer start (e.g., '-5'): ",
847
+ 3: "Enter complex start (e.g., '3+4j' or '3' for 3+3j): ",
848
+ 4: "Enter float start (e.g., '3.14' or '-0.5'): ",
849
+ 5: "Enter rational start (e.g., '7/2' or '5' for 5/1): ",
850
+ 6: "Enter scalar for quaternion base (e.g., '2.5' for 2.5+2.5i+2.5j+2.5k): ",
851
+ 7: "Enter neutrosophic start (e.g., '5+2I' or '7'): ",
852
+ 8: "Enter complex base for neutro-complex (e.g., '1-2j'): ",
853
+ 9: "Enter hyperreal start (e.g., '5+3e' or '10'): ",
854
+ 10: "Enter complex base for bicomplex (e.g., '2+1j'): ",
855
+ 11: "Enter complex base for neutro-bicomplex (e.g., '1+2j'): "
856
+ }
857
+
858
+ # Seçilen tipe göre doğru istemi al, yoksa genel bir istem kullan
859
+ start_prompt = prompts.get(type_choice, "Enter starting value: ")
651
860
 
652
861
  start_input_val_raw = input(start_prompt)
653
- add_base_scalar_val = float(input("Enter base scalar increment (e.g., 9.0): "))
862
+ add_base_scalar_val = float(input("Enter base scalar increment (e.g., 9.0 for positive, -3.0 for negative): "))
654
863
  num_kececi_steps = int(input("Enter number of Keçeci steps (e.g., 15): "))
655
864
 
865
+ # Diziyi oluştur ve çizdir
656
866
  sequence = get_with_params(type_choice, num_kececi_steps, start_input_val_raw, add_base_scalar_val)
657
- plot_numbers(sequence, f"Keçeci Type {type_choice} Sequence")
658
- plt.show()
867
+ if sequence:
868
+ # sequence adı altında bir isim çakışması olmaması için başlığı değiştiriyoruz.
869
+ plot_title = f"Keçeci Type {type_choice} Sequence"
870
+ #plot_numbers(sequence, plot_title)
871
+ #plt.show() # Grafiği göstermek için
872
+
873
+ # Fonksiyonun, ana kodun kullanabilmesi için tüm önemli bilgileri döndürmesini sağlıyoruz.
874
+ return sequence, type_choice, start_input_val_raw, add_base_scalar_val, num_kececi_steps
659
875
 
660
876
  # ==============================================================================
661
877
  # --- ANALYSIS AND PLOTTING ---
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kececinumbers
3
- Version: 0.2.1
3
+ Version: 0.2.3
4
4
  Summary: Keçeci Numbers: An Exploration of a Dynamic Sequence Across Diverse Number Sets
5
5
  Home-page: https://github.com/WhiteSymmetry/kececinumbers
6
6
  Author: Mehmet Keçeci
@@ -128,6 +128,49 @@ https://zenodo.org/records/
128
128
 
129
129
  ### Example
130
130
 
131
+ ```python
132
+ import matplotlib.pyplot as plt
133
+ import kececinumbers as kn
134
+
135
+ print("--- Interactive Test ---")
136
+
137
+ # Adım 1: get_interactive'ten tüm verileri al
138
+ # Not: Fonksiyon artık birden fazla değer döndürüyor.
139
+ interactive_results = kn.get_interactive()
140
+
141
+ # Fonksiyon bir dizi döndürdüyse (başarılıysa) devam et
142
+ if interactive_results and interactive_results[0]:
143
+ # Dönen değerleri değişkenlere ata
144
+ seq_interactive, type_choice, start_val, add_val, steps = interactive_results
145
+
146
+ # Tip numarasını isme çevirelim
147
+ type_names = [
148
+ "Positive Real", "Negative Real", "Complex", "Float", "Rational",
149
+ "Quaternion", "Neutrosophic", "Neutro-Complex", "Hyperreal",
150
+ "Bicomplex", "Neutro-Bicomplex"
151
+ ]
152
+ type_name = type_names[type_choice - 1]
153
+
154
+ # Adım 2: Ayrıntılı raporu yazdır
155
+ params = {
156
+ 'type_choice': type_choice,
157
+ 'type_name': type_name,
158
+ 'start_val': start_val,
159
+ 'add_val': add_val,
160
+ 'steps': steps
161
+ }
162
+ kn.print_detailed_report(seq_interactive, params)
163
+
164
+ # Adım 3: Grafiği SADECE BİR KERE çizdir
165
+ print("\nDisplaying plot...")
166
+ plot_title = f"Interactive Keçeci Sequence ({type_name})"
167
+ kn.plot_numbers(seq_interactive, plot_title)
168
+ plt.show()
169
+
170
+ else:
171
+ print("Sequence generation was cancelled or failed.")
172
+ ```
173
+
131
174
  ```python
132
175
  import matplotlib.pyplot as plt
133
176
  import random
@@ -135,9 +178,6 @@ import numpy as np
135
178
  import math
136
179
  from fractions import Fraction
137
180
  import quaternion # pip install numpy numpy-quaternion
138
- ```
139
- ```python
140
- import matplotlib.pyplot as plt
141
181
  import kececinumbers as kn
142
182
 
143
183
  # Matplotlib grafiklerinin notebook içinde gösterilmesini sağla
@@ -0,0 +1,8 @@
1
+ kececinumbers/__init__.py,sha256=WIyxRjeIKuHHrzqcqiU38Topi2gyLCeaOe_uMJvXv_0,1427
2
+ kececinumbers/_version.py,sha256=JEAyNI1JmKj3piUdMG7qoVLaD_5sllx8xnucwQfbMI8,428
3
+ kececinumbers/kececinumbers.py,sha256=D7bwhI8vJRC8HU07t5mkl9rPXDfOcyD2GROISnIn9Vo,44279
4
+ kececinumbers-0.2.3.dist-info/licenses/LICENSE,sha256=NJZsJEbQuKzxn1mWPWCbRx8jRUqGS22thl8wwuRQJ9c,1071
5
+ kececinumbers-0.2.3.dist-info/METADATA,sha256=j7BXyx-MVh61JeHk0yf4hL6QjNm1-rgHqyNqwGgWJ4k,15398
6
+ kececinumbers-0.2.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
+ kececinumbers-0.2.3.dist-info/top_level.txt,sha256=VvlbQKmTjOlzBbvq54-AaXp_WPRZ5dOhw91lV-ytPRQ,14
8
+ kececinumbers-0.2.3.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- kececinumbers/__init__.py,sha256=k5lyoaqCfkLoRfgQ_ITfAQBBDwxz-MMkB3Vuo8W8cfs,1427
2
- kececinumbers/_version.py,sha256=Cfs4a53BI6K8jI_1NHNBFWPPJ_zXwUrVNHA10jMt4fg,428
3
- kececinumbers/kececinumbers.py,sha256=0zvzVA5JdZONoXDicxEAcktFoJIpRfQDA5vIU7QVERQ,36768
4
- kececinumbers-0.2.1.dist-info/licenses/LICENSE,sha256=NJZsJEbQuKzxn1mWPWCbRx8jRUqGS22thl8wwuRQJ9c,1071
5
- kececinumbers-0.2.1.dist-info/METADATA,sha256=SxaEnEhu4gjF8-URz1MapbR85x0LEybWgUz4vUB9vAs,14097
6
- kececinumbers-0.2.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
- kececinumbers-0.2.1.dist-info/top_level.txt,sha256=VvlbQKmTjOlzBbvq54-AaXp_WPRZ5dOhw91lV-ytPRQ,14
8
- kececinumbers-0.2.1.dist-info/RECORD,,