Natural Numbers | Returns sum of first n natural numbers ; Driver code
def findSum ( n ) : NEW_LINE INDENT sum = 0 NEW_LINE x = 1 NEW_LINE while x <= n : NEW_LINE INDENT sum = sum + x NEW_LINE x = x + 1 NEW_LINE DEDENT return sum NEW_LINE DEDENT n = 5 NEW_LINE print findSum ( n ) NEW_LINE