From Chloe Monson to Everyone: (2:19 PM)def product(x): for things in x: product *= things return productFrom Pranet Sharma to Everyone: (2:19 PM)^From Leonardo Atalla to Everyone: (2:20 PM)you need to define product outside of the loop I think chloeFrom Sophia Benjamin to Everyone: (2:20 PM)I think you need to initialize product as 1 first, right?From Pranet Sharma to Everyone: (2:20 PM)^^you can define it inside the loop too it won't matterFrom Chloe Monson to Everyone: (2:21 PM)Ah you're right just a secFrom Paul Warner to Everyone: (2:21 PM)def sumPositives(x): """prec: x is a numerical list postc: returns the sum of the positive entries in the list""" sum_x = 0 for i in x: sum_x += max(0, i) return sum_xFrom Chloe Monson to Everyone: (2:21 PM)def product(x): product = 1 for things in x: product *= things return productFrom Carl Pittenger to Everyone: (2:22 PM)def smallestFactor(n): if n == 2 or n == 3: return n elif n % 2 == 0: return 2 elif n % 3 == 0: return 3 else: for i in range(6, int(n ** 0.5) + 1, 6): if n % (i - 1) == 0: return i - 1 elif n % (i + 1) == 0: return i + 1 return nFrom Sophia Benjamin to Everyone: (2:24 PM)def product(x): if (x==[]): return 1 return x[0]*product(x[1:])^recursive thingFrom Leo Atalla to Everyone: (2:25 PM)def smallestFactor(n): if (n <= 1) return False i = 2 while i < n-1: if n%i == 0: return False i+=1 return TrueohhFrom Dhruv Ranganath to Everyone: (2:25 PM)def sumDigits(n): num = [int(i) for i in str(n)] return sum(num)From Leo Atalla to Everyone: (2:27 PM)def smallestFactor(n): if (n <= 1) return -1 i = 2 while i < n-1: if n%i == 0: return i i+=1 return -1From Me to Everyone: (2:27 PM)Cousin Kevins solution:def sumPositives(x): return sum([max(k, 0) for k in x])From Pranet Sharma to Everyone: (2:29 PM)def smallest_factor(n): if n % 2 == 0: return 2 else: temp = range([3, n]) for i in temp: if n % i == 0: return iFrom Sophia Benjamin to Everyone: (2:29 PM)def smallestFactor(n): i = 2 rem = 1 while rem: rem = n%i i+=1 return i-1From Dhruv Ranganath to Everyone: (2:29 PM)def sumOfSquaresOfDigits(n): return sum([int(i) ** 2 for i in str(n)])From Chloe Monson to Everyone: (2:30 PM)def sumPositives(x): posSum = 0 for things in x: if str(things).startswith("-"): posSum += 0 else: posSum += things return posSumFrom Me to Everyone: (2:31 PM)laginapppeFrom Sophia Benjamin to Everyone: (2:31 PM)def isPrime(n): return smallestFactor(n)==nFrom Chloe Monson to Everyone: (2:31 PM)def sumNegatives(x): negSum = 0 for things in x: if str(things).startswith("-"): negSum += things else: negSum += 0 return negSum