From 077fa6fa023e37add399c46b149c430b5be48104 Mon Sep 17 00:00:00 2001 From: ACKERMANNGUE <gawen.ackermann@etu.hesge.ch> Date: Thu, 16 Dec 2021 11:22:07 +0100 Subject: [PATCH] 99234723 --- polynomial.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/polynomial.py b/polynomial.py index a40bb9a..68434ce 100644 --- a/polynomial.py +++ b/polynomial.py @@ -11,8 +11,7 @@ def unicode_superscripts(number): Returns: str: The unicode superscripts string. """ - exponent_dict = {"0": "⁰", "1": "¹", "2": "²", "3": "³", - "4": "⁴", "5": "⁵", "6": "⁶", "7": "⁷", "8": "⁸", "9": "⁹"} + exponent_dict = {"0": "⁰", "1": "¹", "2": "²", "3": "³", "4": "⁴", "5": "⁵", "6": "⁶", "7": "⁷", "8": "⁸", "9": "⁹"} return ("⁻" if number < 0 else "") + "".join(exponent_dict[x] for x in str(abs(number))) @@ -220,7 +219,7 @@ def reed_solomon(points, data_length, last_error_index, prime_number): # Parse each combination of points possible (exclude the correct points) for x in itertools.combinations(points[: last_error_index + 1], combination_length): # Create a sublist of points with all corrects points and the current combination of points - sub_points = list(x) + points[last_error_index + 1:] + sub_points = list(x) + points[last_error_index + 1 :] # Create the lagrange polynomial with the sublist of points lagrange = compute_lagrange_polynomial(sub_points, prime_number) -- GitLab