mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-02-25 10:28:39 +00:00
Fix review issues
This commit is contained in:
parent
64449865ae
commit
37a7aa52d5
@ -56,19 +56,15 @@ def points_to_polynomial(coordinates: list[list[int]]) -> str:
|
|||||||
vector: list[float] = [coordinates[count_of_line][1] for count_of_line in range(x)]
|
vector: list[float] = [coordinates[count_of_line][1] for count_of_line in range(x)]
|
||||||
|
|
||||||
for count in range(x):
|
for count in range(x):
|
||||||
zahlen = 0
|
for number in range(x):
|
||||||
while zahlen < x:
|
if count == number:
|
||||||
if count == zahlen:
|
continue
|
||||||
zahlen += 1
|
fraction = matrix[number][count] / matrix[count][count]
|
||||||
if zahlen == x:
|
|
||||||
break
|
|
||||||
bruch = matrix[zahlen][count] / matrix[count][count]
|
|
||||||
for counting_columns, item in enumerate(matrix[count]):
|
for counting_columns, item in enumerate(matrix[count]):
|
||||||
# manipulating all the values in the matrix
|
# manipulating all the values in the matrix
|
||||||
matrix[zahlen][counting_columns] -= item * bruch
|
matrix[number][counting_columns] -= item * fraction
|
||||||
# manipulating the values in the vector
|
# manipulating the values in the vector
|
||||||
vector[zahlen] -= vector[count] * bruch
|
vector[number] -= vector[count] * fraction
|
||||||
zahlen += 1
|
|
||||||
|
|
||||||
# make solutions
|
# make solutions
|
||||||
solution: list[str] = [
|
solution: list[str] = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user