Skip to content

Commit d9e59d9

Browse files
committed
Add new file
1 parent ca7944e commit d9e59d9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Diff for: squared.py

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
def square_digits(num):
2+
result = ""
3+
num = str(num)
4+
for i in num:
5+
result += str(int(i) ** 2)
6+
return int(result)
7+
8+
9+
10+
11+
print square_digits(9119)

0 commit comments

Comments
 (0)