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

Matthew Williams
Matthew Williams
3,103 Points

I need help calculating two variables

I'm trying to get two variables to add together. Here's my code.

current_count = 14
planned = 5
upcoming_releases = 2

del planned

total = current_count + upcoming_release

print(total)
print(current_count + upcoming_release)```

What I'm trying to get together is 'current_count' and 'upcoming_release'. Any help would be greatly appreciated.

```delete.py
current_count = 14
planned = 5
upcoming_releases = 2

del planned

total = current_count + upcoming_release

print(total)
print(current_count + upcoming_release)

1 Answer

Torsten Lundahl
Torsten Lundahl
2,570 Points

You are just about right, but you mispelled a variable and that's causing the error.

Your code is adding upcoming_release instead of upcoming_releases

Change it to:

del planned

total = current_count + upcoming_releases

Good luck!