My code works fine I just have a simple question about modifying the code:
If I wanted to SUM all of the lines that get printed, how would I go about doing that?
i figured it would be as simple as:
print sum(num ** 2) but this does not work. May I please have some guidance on such a simple task?
numbers = [7, 9, 12, 54, 99] print "This list contains: " for num in numbers: print num # Add your loop below! for num in numbers: print num ** 2