PseudoRandom-IntAU 1.0.0__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.
@@ -0,0 +1,32 @@
1
+
2
+ import random
3
+
4
+ def generate_random_integer(lower_bound, upper_bound):
5
+ """
6
+ Generate a pseudo-random integer between two bounds (inclusive).
7
+
8
+ Parameters:
9
+ lower_bound (int): The minimum value of the random range.
10
+ upper_bound (int): The maximum value of the random range.
11
+
12
+ Returns:
13
+ int: A pseudo-random integer between lower_bound and upper_bound.
14
+
15
+ Raises:
16
+ ValueError: If lower_bound is greater than upper_bound.
17
+ """
18
+
19
+ # Validate input: lower bound must not exceed upper bound
20
+ if lower_bound > upper_bound:
21
+ raise ValueError("Lower bound must be less than or equal to upper bound.")
22
+
23
+ # Generate and return a random integer within the specified range
24
+ # random.randint(a, b) includes both endpoints a and b
25
+ random_number = random.randint(lower_bound, upper_bound)
26
+
27
+ return random_number
28
+
29
+
30
+ # Example usage
31
+ # if __name__ == "__main__":
32
+ # print(generate_random_integer(1, 10))
@@ -0,0 +1,6 @@
1
+ """
2
+ __init__.py creates a packet
3
+ """
4
+
5
+
6
+ from .RandomIntegerAU import generate_random_integer
@@ -0,0 +1,7 @@
1
+ Metadata-Version: 2.4
2
+ Name: PseudoRandom-IntAU
3
+ Version: 1.0.0
4
+ Summary: Pseudo Random Number
5
+ Author-email: Andreas Urech <andreas.urech@ch.abb.com>
6
+ License: MIT
7
+ Description-Content-Type: text/markdown
@@ -0,0 +1,6 @@
1
+ PseudoRandomAU/RandomIntegerAU.py,sha256=d-Syph3y-oRIz3PPgWl1uuLXZJ2X6fm8qNbj35z8uX8,974
2
+ PseudoRandomAU/__init__.py,sha256=HP75KNVMJRyuX9hrIuz3LHWfGLhL-crBDIhLTS_D4ic,96
3
+ pseudorandom_intau-1.0.0.dist-info/METADATA,sha256=sawUeKc8SGkgM87yJf0pziDt2DEwj7n3jU-GL38PMS0,207
4
+ pseudorandom_intau-1.0.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
5
+ pseudorandom_intau-1.0.0.dist-info/top_level.txt,sha256=tim6Q1T3IXoDyfjDzExUC1DG2Kujex_wJe_bzz8_fPw,15
6
+ pseudorandom_intau-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ PseudoRandomAU