Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Sai Teja
3,300 Pointsso i am stuck at this problem
int1=[1,2]
int2=0
limit = 4000000
for i in range(0, 40):
if int1[i+1]+int1[i]<limit:
int1.append(int1[i+1]+int1[i])
else:
continue
for j in int1:
if j%2 == 0:
int2 += j
print(int1)
print(int2)
this the code i used and it is not working, why is it so.
1 Answer
Yoel Dovid Cohen
13,405 PointsI am just beginning, but maybe you should add white spacing after the "if" and "else"
Sai Teja
3,300 PointsSai Teja
3,300 Pointsno that is not the spacing issue there is some issue related to that 4 million thing