## Name: Josh Cox and Joseph Black
## Program: sumFunctions.py
## Problem: Sum and cube of n natural numbers.

def sumN(n):
    total = 0
    for i in range(n):
        total += 1 + i
    return total

def sumNCubes(n):
    total = 0
    for i in range(n):
        total += (1 + i) ** 3
    return total

def main():
    numNatural = eval(input("How many natural numbers for n? "))
    answer1 = sumN(numNatural)
    answer2 = sumNCubes(numNatural)
    print(answer1)
    print(answer2)

main()

476f263a4e4ecbfc52387102b9734ffad91b4c70
<mask token>


def main():
    numNatural = eval(input('How many natural numbers for n? '))
    answer1 = sumN(numNatural)
    answer2 = sumNCubes(numNatural)
    print(answer1)
    print(answer2)


<mask token>

<mask token>


def sumNCubes(n):
    total = 0
    for i in range(n):
        total += (1 + i) ** 3
    return total


def main():
    numNatural = eval(input('How many natural numbers for n? '))
    answer1 = sumN(numNatural)
    answer2 = sumNCubes(numNatural)
    print(answer1)
    print(answer2)


<mask token>

def sumN(n):
    total = 0
    for i in range(n):
        total += 1 + i
    return total


def sumNCubes(n):
    total = 0
    for i in range(n):
        total += (1 + i) ** 3
    return total


def main():
    numNatural = eval(input('How many natural numbers for n? '))
    answer1 = sumN(numNatural)
    answer2 = sumNCubes(numNatural)
    print(answer1)
    print(answer2)


<mask token>

def sumN(n):
    total = 0
    for i in range(n):
        total += 1 + i
    return total


def sumNCubes(n):
    total = 0
    for i in range(n):
        total += (1 + i) ** 3
    return total


def main():
    numNatural = eval(input('How many natural numbers for n? '))
    answer1 = sumN(numNatural)
    answer2 = sumNCubes(numNatural)
    print(answer1)
    print(answer2)


main()

## Name: Josh Cox and Joseph Black
## Program: sumFunctions.py
## Problem: Sum and cube of n natural numbers.

def sumN(n):
    total = 0
    for i in range(n):
        total += 1 + i
    return total

def sumNCubes(n):
    total = 0
    for i in range(n):
        total += (1 + i) ** 3
    return total

def main():
    numNatural = eval(input("How many natural numbers for n? "))
    answer1 = sumN(numNatural)
    answer2 = sumNCubes(numNatural)
    print(answer1)
    print(answer2)

main()
