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

Siyuan Welch
Siyuan Welch
3,025 Points

Excellent! Now I need you to add a new variable named total. Then assign total to the sum of current_count and upcoming_

It seems like treehouse have a bug!

4 Answers

Ferdinand Pretorius
Ferdinand Pretorius
18,705 Points

It fails because you are trying to delete the variable called "planned", however there is no such variable.

The code you need looks like this:

current_count = 14
planned = 5
upcoming_releases = 2

del planned

total = current_count + upcoming_releases

Hope this helps!

Siyuan Welch
Siyuan Welch
3,025 Points

Thank you so much! It worked.

Ferdinand Pretorius
Ferdinand Pretorius
18,705 Points

I've just had a look and it seems fine.

The line reads as follow:

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

Siyuan Welch
Siyuan Welch
3,025 Points

This is my code but can not pass, can you tell me why please current_count = 14 del planned = 5 upcoming_releases = 2 total = current_count + upcoming_releases

Siyuan Welch
Siyuan Welch
3,025 Points

It will give me this warn! Bummer! invalid syntax (delete.py, line 2)

Siyuan Welch
Siyuan Welch
3,025 Points

Thank you so much! It worked.

This was throwing me off because is specifically says to declare a var. total = current_count + upcoming_releases works