Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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