Skip to content

Commit dd3b499

Browse files
cclaussgithub-actions
and
github-actions
authored
Rename is_palindrome.py to is_int_palindrome.py (#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 a17791d commit dd3b499

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

DIRECTORY.md

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

maths/is_palindrome.py 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)