Sign Up
Time to claim your honor
Training
Practice
Complete challenging
Kata
to earn honor and ranks. Re-train to hone technique
Freestyle Sparring
Take turns remixing and refactoring others code through
Kumite
Community
Leaderboards
Achieve honor and move up the global leaderboards
Chat
Join our
Discord
server and chat with your fellow code warriors
Discussions
View our
Github Discussions
board to discuss general Codewars topics
About
Docs
Learn about all of the different aspects of Codewars
Blog
Read the latest news from Codewars and the community
Log In
Sign Up
Name:
Unknown
Clan:
Unknown
Member Since:
Sep 2022
Last Seen:
Aug 2024
Profiles:
Following:
0
Followers:
0
Allies:
0
View Profile Badges
Stats
Kata
Collections
Kumite
Social
Discourse
Published
Alextararas
vs.
azerbay1984
2 years ago
Write your own sum()
Code
Diff
def
sumi
(
arr
):
return
sum
(
arr
)
def sumi(arr):
# parity: sum([]) == 0
#try: return arr.pop(0) + sumi(arr)
#except:
return
0
sum=0
for i in range(len
(arr)
):
sum+=arr[i]
i+=1
return sum
def sumi(arr):
return
sum
(arr)
Fork
Discuss (1)
Fixture
Confirm
Collect:
undefined
Loading collection data...