File tree Expand file tree Collapse file tree 4 files changed +18
-7
lines changed Expand file tree Collapse file tree 4 files changed +18
-7
lines changed Original file line number Diff line number Diff line change 1515 * [ All Permutations] ( https://github.com/TheAlgorithms/Python/blob/master/backtracking/all_permutations.py )
1616 * [ All Subsequences] ( https://github.com/TheAlgorithms/Python/blob/master/backtracking/all_subsequences.py )
1717 * [ 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 )
1819 * [ Minimax] ( https://github.com/TheAlgorithms/Python/blob/master/backtracking/minimax.py )
1920 * [ N Queens] ( https://github.com/TheAlgorithms/Python/blob/master/backtracking/n_queens.py )
2021 * [ Sudoku] ( https://github.com/TheAlgorithms/Python/blob/master/backtracking/sudoku.py )
8990 * [ Number Of Possible Binary Trees] ( https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary_tree/number_of_possible_binary_trees.py )
9091 * [ Red Black Tree] ( https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary_tree/red_black_tree.py )
9192 * [ 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 )
9294 * [ Treap] ( https://github.com/TheAlgorithms/Python/blob/master/data_structures/binary_tree/treap.py )
9395 * Data Structures
9496 * Heap
499501 * [ Sol1] ( https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_25/sol1.py )
500502 * [ Sol2] ( https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_25/sol2.py )
501503 * [ 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 )
502506 * Problem 27
503507 * [ Problem 27 Sol1] ( https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_27/problem_27_sol1.py )
504508 * Problem 28
Original file line number Diff line number Diff line change @@ -41,15 +41,18 @@ def armstrong_number(n: int) -> bool:
4141 temp //= 10
4242 return n == sum
4343
44- def narcissistic_number (n :int ) -> bool :
44+
45+ def narcissistic_number (n : int ) -> bool :
4546 """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
5153 return n == sum (temp )
5254
55+
5356def main ():
5457 """
5558 Request that user input an integer and tell them if it is Armstrong number.
Original file line number Diff line number Diff line change 55in its decimal fraction part.
66"""
77
8+
89def find_digit (numerator : int , digit : int ) -> int :
910 """
1011 Considering any range can be provided,
Original file line number Diff line number Diff line change 1919
2020 print (len (links ))
2121 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