Commit bd74f20
authored
added type hints and doctests to arithmetic_analysis/bisection.py (TheAlgorithms#2241)
* added type hints and doctests to arithmetic_analysis/bisection.py
continuing in line with TheAlgorithms#2128
* modified arithmetic_analysis/bisection.py
Put back print statement at the end, replaced algorithm's print statement with an exception.
* modified arithmetic_analysis/bisection.py
Removed unnecessary type import "Optional"
* modified arithmetic_analysis/bisection.py
Replaced generic Exception with ValueError.
* modified arithmetic_analysis/bisection.py
fixed doctests1 parent dfb4ce4 commit bd74f20
1 file changed
+31
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
10 | 24 | | |
11 | 25 | | |
12 | 26 | | |
13 | 27 | | |
14 | 28 | | |
15 | 29 | | |
16 | 30 | | |
17 | | - | |
18 | | - | |
19 | | - | |
| 31 | + | |
| 32 | + | |
20 | 33 | | |
21 | | - | |
22 | | - | |
| 34 | + | |
| 35 | + | |
23 | 36 | | |
24 | 37 | | |
25 | 38 | | |
| |||
30 | 43 | | |
31 | 44 | | |
32 | 45 | | |
33 | | - | |
34 | | - | |
| 46 | + | |
| 47 | + | |
35 | 48 | | |
36 | 49 | | |
37 | 50 | | |
38 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
0 commit comments