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 trialRyan Shah
Courses Plus Student 239 PointsHow can i solve this problem
i tried sum function and also make a new variable the code is running on python shell but not working here..Is there any other solution for this please let me know.. Thank you
current_count = 14
planned = 4
upcoming_releases = 2
del planned
total = 16
1 Answer
andren
28,558 PointsThere are two issues with your code:
You have changed the value assigned to the
planned
array. When the challenge loads it starts out at 5 and you have changed it to 4. Making any changes in these challenges that are not explicitly asked for will often break the code validation and lead you to be unable to complete the challenge.You are not meant to calculate the sum of
current_count
andupcoming_releases
yourself. You are meant to have Python do that for you automatically by using the+
operator and then assigning the result of that to thetotal
variable.
Like this:
current_count = 14
planned = 5
upcoming_releases = 2
del planned
total = current_count + upcoming_releases
Ryan Shah
Courses Plus Student 239 PointsRyan Shah
Courses Plus Student 239 PointsOh.. I really missed that.. Thank you so much next time i read the code carefully