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 trialPH Oracius
257 Pointsstep 2 keeps bringing me back to step 1
step refers me back to step saying it is not passing although i had already got it correct.
current_count = 14
planned = 5
upcoming_releases = 2
del planned = 5
sum = "total"
current_count + upcoming_releases = "total"
print (sum)
1 Answer
Gabbie Metheny
33,778 PointsUsually a "Task 1 is no longer passing" error means that something is going on in your new code that's messing up your first answer. Right now, you have a lot of extraneous code that could be throwing off the interpreter. Let's try and simplify:
- The challenge doesn't ask you to
print
anything, so you can remove the line where you printsum
. - When you delete
planned
, you shouldn't include the= 5
: the interpreter already knows what your variable holds, and it will delete the whole thing.del planned
is sufficient. - Currently, you're assigning the string
"total"
to the variablesum
, and on the following line you're adding the two variables and setting them to the string"total"
as well, but your variable should be namedtotal
and it should be assigned the sum of the other remaining variables (current_count
andupcoming_releases
), like so:total = current_count + upcoming_releases
. The wordsum
shouldn't appear anywhere in your code, sum is just the description of the task you need to accomplish: adding two things.
In all, you should only need to add two lines of code to the starter code to complete this challenge. Let me know if you're still having trouble!