13. For Your Lists- Very odd problem


#1

Hi guys, please see the code below.

With this code, I am able to print this
"This list contains:
7
9
12
54
99
49 81 144 2916 9801None"

However, It includes this error message: Oops, try again. It looks like your code did not print 49 (7 squared.

This is really odd. I can see 49. No matter what I do, I can't change this. Can anyone help?


numbers  = [7, 9, 12, 54, 99]

print "This list contains: "
for num in numbers:
    print num
# Add your loop below!
for maho in numbers:
    print maho**2,


#2

I may possibly be your browser try Chrome/Safari they are normally working quite nicely.
Hope this helped :slight_smile:


#3

Hi, thanks a lot. I couldn't delete the post, but I found the silliest solution to this silly problem. I just have to print them on separate lines; so I removed the comma at the end!


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.