4/15 need help


my code
while int(n)<0:
def degit_sum(n):

for i in len(n):
print s
return s

but it doesn't work


You can't iterate through an int, from my understanding. I got around this by converting the original input value to a string, then iterating through that string, converting each digit back to an int inside of the loop


It is // here we define our method using "this", before we even introduce bob
var setAge = function (newAge) {
this.age = newAge;
// now we make bob
var bob = new Object();
bob.age = 30;
// and down here we just use the method we already made
bob.setAge = setAge;

// change bob's age to 50 here