Removed Unnecessary Assignment for 'error' Var (#920) · silam/TheAlgorithmPython@2b36528 · GitHub
Skip to content

Commit 2b36528

Browse files
PatOnTheBackpoyea
authored andcommitted
Removed Unnecessary Assignment for 'error' Var (TheAlgorithms#920)
`error = abs(f(a))` was declared on line 24 and line 32. It is unnecessary to have in both places. I removed the second instance since it wastes resources to keep redefining the variable inside the for loop. This fixes an [issue found by lgtm](https://lgtm.com/projects/g/TheAlgorithms/Python/snapshot/66c4afbd0f28f9989f35ddbeb5c9263390c5d192/files/maths/newton_raphson.py?sort=name&dir=ASC&mode=heatmap)
1 parent 234b0a7 commit 2b36528

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

maths/newton_raphson.py

Lines changed: 0 additions & 1 deletion

0 commit comments

Comments
 (0)