MCPcopy Create free account
hub / github.com/CodeWithHarry/The-Ultimate-Python-Course / sum

Function sum

Chapter 8 - PS/04_problem4.py:12–15  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

10'''
11
12def sum(n):
13 if(n==1):
14 return 1
15 return sum(n-1) + n
16
17print(sum(4))

Callers 1

04_problem4.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected