File tree 4 files changed +18
-7
lines changed
4 files changed +18
-7
lines changed Original file line number Diff line number Diff line change 15
15
* [ All Permutations] ( https://github.com/TheAlgorithms/Python/blob/master/backtracking/all_permutations.py )
16
16
* [ All Subsequences] ( https://github.com/TheAlgorithms/Python/blob/master/backtracking/all_subsequences.py )
17
17
* [ Coloring] ( https://github.com/TheAlgorithms/Python/blob/master/backtracking/coloring.py )
18
+ * [ Hamiltonian Cycle] ( https://github.com/TheAlgorithms/Python/blob/master/backtracking/hamiltonian_cycle.py )
18
19
* [ Minimax] ( https://github.com/TheAlgorithms/Python/blob/master/backtracking/minimax.py )
19
20
* [ N Queens] ( https://github.com/TheAlgorithms/Python/blob/master/backtracking/n_queens.py )
20
21
* [ Sudoku] ( https://github.com/TheAlgorithms/Python/blob/master/backtracking/sudoku.py )
89
90
* [ Number Of Possible Binary Trees] ( https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary_tree/number_of_possible_binary_trees.py )
90
91
* [ Red Black Tree] ( https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary_tree/red_black_tree.py )
91
92
* [ Segment Tree] ( https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary_tree/segment_tree.py )
93
+ * [ Segment Tree Other] ( https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary_tree/segment_tree_other.py )
92
94
* [ Treap] ( https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary_tree/treap.py )
93
95
* Data Structures
94
96
* Heap
499
501
* [ Sol1] ( https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_25/sol1.py )
500
502
* [ Sol2] ( https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_25/sol2.py )
501
503
* [ Sol3] ( https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_25/sol3.py )
504
+ * Problem 26
505
+ * [ Sol1] ( https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_26/sol1.py )
502
506
* Problem 27
503
507
* [ Problem 27 Sol1] ( https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_27/problem_27_sol1.py )
504
508
* Problem 28
Original file line number Diff line number Diff line change @@ -41,15 +41,18 @@ def armstrong_number(n: int) -> bool:
41
41
temp //= 10
42
42
return n == sum
43
43
44
- def narcissistic_number (n :int ) -> bool :
44
+
45
+ def narcissistic_number (n : int ) -> bool :
45
46
"""Return True if n is a narcissistic number or False if it is not"""
46
-
47
- expo = len (str (n )) #power, all number will be raised to
48
- temp = [(int (i )** expo ) for i in str (n )] # each digit will be multiplied expo times
49
-
50
- # check if sum of cube of each digit is equal to number
47
+
48
+ expo = len (str (n )) # power, all number will be raised to
49
+ # each digit will be multiplied expo times
50
+ temp = [(int (i ) ** expo ) for i in str (n )]
51
+
52
+ # check if sum of cube of each digit is equal to number
51
53
return n == sum (temp )
52
54
55
+
53
56
def main ():
54
57
"""
55
58
Request that user input an integer and tell them if it is Armstrong number.
Original file line number Diff line number Diff line change 5
5
in its decimal fraction part.
6
6
"""
7
7
8
+
8
9
def find_digit (numerator : int , digit : int ) -> int :
9
10
"""
10
11
Considering any range can be provided,
Original file line number Diff line number Diff line change 19
19
20
20
print (len (links ))
21
21
for link in links :
22
- webbrowser .open (f"http://google.com{ link .get ('href' )} " )
22
+ if link .text == "Maps" :
23
+ webbrowser .open (link .get ("href" ))
24
+ else :
25
+ webbrowser .open (f"http://google.com{ link .get ('href' )} " )
You can’t perform that action at this time.
0 commit comments