diff --git a/Python/Brute Force Helo, World!.py b/Python/Brute Force Helo, World!.py new file mode 100644 index 0000000..aad71c1 --- /dev/null +++ b/Python/Brute Force Helo, World!.py @@ -0,0 +1,12 @@ +import random + +target = 'Hello World!' +testString = '' + +while testString != target: + testString = '' + for i in range(12): + testString += chr(random.randint(32, 126)) + print(testString) + +print(testString) diff --git a/Python/countup/Countup.py b/Python/Countup.py similarity index 100% rename from Python/countup/Countup.py rename to Python/Countup.py diff --git a/Python/Login/players b/Python/Login/players deleted file mode 100644 index c0aaca4..0000000 Binary files a/Python/Login/players and /dev/null differ diff --git a/Python/Prime cracker/Prime cracker.py b/Python/Prime cracker.py similarity index 100% rename from Python/Prime cracker/Prime cracker.py rename to Python/Prime cracker.py diff --git a/Python/Quadratics.py b/Python/Quadratics.py new file mode 100644 index 0000000..c88a908 --- /dev/null +++ b/Python/Quadratics.py @@ -0,0 +1,59 @@ +from cmath import sqrt + +a = '' +b = '' +c = '' + +success = False + +while success == False: + try: + a = float(input("a: ")) + success = True + except: + print("That is not a number") + +success = False + +while success == False: + try: + b = float(input("b: ")) + success = True + except: + print("That is not a number") + +success = False + +while success == False: + try: + c = float(input("c: ")) + success = True + except: + print("That is not a number") + +bn = -b +s1 = b ** 2 +s2 = 4 * a * c +discriminant = sqrt(s1 - s2) + +dinom = 2 * a + +if discriminant == 0: + neum = bn + discriminant + root = neum1 / dinom + root = root.real + + print("Root: ", root) +else: + neum1 = bn - discriminant + neum2 = bn + discriminant + + root1 = neum1 / dinom + root2 = neum2 / dinom + root1 = root1.real + root2 = root2.real + + print("Root 1: ", root1) + print("Root 2: ", root2) + + diff --git a/Python/RPS/RPS-Ducky_Vinex-1_1.py b/Python/RPS-Ducky_Vinex-1_1.py similarity index 100% rename from Python/RPS/RPS-Ducky_Vinex-1_1.py rename to Python/RPS-Ducky_Vinex-1_1.py diff --git a/Python/IDK/asd.py b/Python/asd.py similarity index 100% rename from Python/IDK/asd.py rename to Python/asd.py diff --git a/Python/Login/login_cod.py b/Python/login_cod.py similarity index 100% rename from Python/Login/login_cod.py rename to Python/login_cod.py