Here are the problems we all have solved
Your browser does not support viewing this document. Click here to download the document.
def xpresents(x):
num = 0
sol = 0
while num != x:
num += 1
temp = num
while temp != 0:
sol += temp
temp -= 1
return sol
for i in range(20):
print xpresents(i)
num = 0
sol = 0
while num != x:
num += 1
temp = num
while temp != 0:
sol += temp
temp -= 1
return sol
for i in range(20):
print xpresents(i)