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

Python Python Basics (2015) Python Data Types Del

jordan tucker
jordan tucker
2,304 Points

python

Excellent! Now I need you to add a new variable named total. Then assign the sum of current_count and upcoming_releases to total. I'd like you to use the variables, but if you need to use the numbers, that's OK.

delete.py
current_count = 14
planned = 5
upcoming_releases = 2
total = current_count + upcoming_release
jordan tucker
jordan tucker
2,304 Points

it keeps saying task one is no longer completing.

any help will be appreciated.

3 Answers

Marcel Negrete
Marcel Negrete
1,804 Points

Make sure and keep the code ("del planned") from the first step instead of deleting it.

current_count = 14
planned = 5
del planned
upcoming_releases = 2
total = current_count + upcoming_release
Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! The reason it's saying "Task 1 is no longer passing" is because you've introduced a syntax error and the code can no longer be compiled. Don't worry! It's a small issue... just a typo.

Take a look at your code:

upcoming_releases = 2
total = current_count + upcoming_release

On the second line where you are adding the two together, you've misspelled upcoming_releases as upcoming_release. Note the omission of the "s" in the latter. Because upcoming_releases is a defined variable, but upcoming_release is not, it will give a compiler error. Simply adding an "s" to upcoming_release should get rid of that error message.

Hope this helps! :sparkles:

edited for additional note

Marcel Negrete is correct. You should leave the del planned from the previous task as these tasks are cumulative.

jordan tucker
jordan tucker
2,304 Points

thank you so much Jennifer, that done the trick! ill be more careful and look out for small mistakes like this from now on. much appreciated. ;-D

jordan tucker
jordan tucker
2,304 Points

Hi Marcel, thanks for you swift response. i have actually tried leaving the "del planned" in the code but its keeps saying "opps looks like task one is no longer passing".

other than the del planned code missing in my screen shot, does the rest of my code look correct?