Skip to content

Commit

Permalink
Merge pull request souravjain540#37 from DEBOBANI/main
Browse files Browse the repository at this point in the history
Automorphic Number
  • Loading branch information
souravjain540 committed Oct 3, 2022
2 parents 88b3c22 + 5ed3e07 commit 7fc74ce
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
14 changes: 14 additions & 0 deletions automorphic.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
print("Enter the number you want to check:")
num=int(input())
square=num*num
flag=0
while(num>0):
if(num%10!=square%10):
print("No, it is not an automorphic number.")
flag=1
break

num=num//10
square=square//10
if(flag==0):
print("Yes, it is an automorphic number.")
8 changes: 8 additions & 0 deletions duplicates.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
def Remove(duplicate):
final_list = []
for num in duplicate:
if num not in final_list:
final_list.append(num)
return final_list
duplicate = [2, 4, 10, 20, 5, 2, 20, 4]
print(Remove(duplicate))

0 comments on commit 7fc74ce

Please sign in to comment.