File tree 2 files changed +8
-8
lines changed
2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 577
577
* [ Hardy Ramanujanalgo] ( maths/hardy_ramanujanalgo.py )
578
578
* [ Hexagonal Number] ( maths/hexagonal_number.py )
579
579
* [ Integration By Simpson Approx] ( maths/integration_by_simpson_approx.py )
580
+ * [ Is Int Palindrome] ( maths/is_int_palindrome.py )
580
581
* [ Is Ip V4 Address Valid] ( maths/is_ip_v4_address_valid.py )
581
- * [ Is Palindrome] ( maths/is_palindrome.py )
582
582
* [ Is Square Free] ( maths/is_square_free.py )
583
583
* [ Jaccard Similarity] ( maths/jaccard_similarity.py )
584
584
* [ Juggler Sequence] ( maths/juggler_sequence.py )
Original file line number Diff line number Diff line change 1
- def is_palindrome (num : int ) -> bool :
1
+ def is_int_palindrome (num : int ) -> bool :
2
2
"""
3
3
Returns whether `num` is a palindrome or not
4
4
(see for reference https://en.wikipedia.org/wiki/Palindromic_number).
5
5
6
- >>> is_palindrome (-121)
6
+ >>> is_int_palindrome (-121)
7
7
False
8
- >>> is_palindrome (0)
8
+ >>> is_int_palindrome (0)
9
9
True
10
- >>> is_palindrome (10)
10
+ >>> is_int_palindrome (10)
11
11
False
12
- >>> is_palindrome (11)
12
+ >>> is_int_palindrome (11)
13
13
True
14
- >>> is_palindrome (101)
14
+ >>> is_int_palindrome (101)
15
15
True
16
- >>> is_palindrome (120)
16
+ >>> is_int_palindrome (120)
17
17
False
18
18
"""
19
19
if num < 0 :
You can’t perform that action at this time.
0 commit comments