Skip to content

Commit 9af6da8

Browse files
cclaussgithub-actions
authored andcommitted
Rename is_palindrome.py to is_int_palindrome.py (TheAlgorithms#8768)
* Rename is_palindrome.py to is_int_palindrome.py * updating DIRECTORY.md --------- Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
1 parent 7333b51 commit 9af6da8

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Diff for: DIRECTORY.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -578,8 +578,8 @@
578578
* [Hardy Ramanujanalgo](maths/hardy_ramanujanalgo.py)
579579
* [Hexagonal Number](maths/hexagonal_number.py)
580580
* [Integration By Simpson Approx](maths/integration_by_simpson_approx.py)
581+
* [Is Int Palindrome](maths/is_int_palindrome.py)
581582
* [Is Ip V4 Address Valid](maths/is_ip_v4_address_valid.py)
582-
* [Is Palindrome](maths/is_palindrome.py)
583583
* [Is Square Free](maths/is_square_free.py)
584584
* [Jaccard Similarity](maths/jaccard_similarity.py)
585585
* [Juggler Sequence](maths/juggler_sequence.py)

Diff for: maths/is_palindrome.py renamed to maths/is_int_palindrome.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
def is_palindrome(num: int) -> bool:
1+
def is_int_palindrome(num: int) -> bool:
22
"""
33
Returns whether `num` is a palindrome or not
44
(see for reference https://en.wikipedia.org/wiki/Palindromic_number).
55
6-
>>> is_palindrome(-121)
6+
>>> is_int_palindrome(-121)
77
False
8-
>>> is_palindrome(0)
8+
>>> is_int_palindrome(0)
99
True
10-
>>> is_palindrome(10)
10+
>>> is_int_palindrome(10)
1111
False
12-
>>> is_palindrome(11)
12+
>>> is_int_palindrome(11)
1313
True
14-
>>> is_palindrome(101)
14+
>>> is_int_palindrome(101)
1515
True
16-
>>> is_palindrome(120)
16+
>>> is_int_palindrome(120)
1717
False
1818
"""
1919
if num < 0:

0 commit comments

Comments
 (0)