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 trialYasser Shaaf
UX Design Techdegree Student 13,865 Pointshello all ,
how we can solve this problem
10 Answers
Kevin Faust
15,353 Points#WRONG SOLUTION
current_count = 14
del planned = 5 #you are trying to assign the "planned" variable to the number 5 and trying to delete it at the same time
upcoming_releases = 2
total = current_count + upcoming_releases
#CORRECT SOLUTION
current_count = 14
planned = 5 #planned variable exists
upcoming_releases = 2
del planned #we delete that planned variable
total = current_count + upcoming_releases
What you did was the first block of code above. The correct code is the one below it. You are not supposed to modify the given variables. Take a look at the comments I put in the above code. Tell me if you understand and if it works now
Kevin Faust
15,353 PointsChallenge 1: easily delete planned
del planned
Challenge 2: add up the two things that the instructions said to add and assign to variable called "total"
total = current_count + upcoming_releases
Yasser Shaaf
UX Design Techdegree Student 13,865 PointsI did as you did in the second challenge but it is still wrong !
Kevin Faust
15,353 PointsI tried it and it works perfectly fine. maybe try switching browsers?
Yasser Shaaf
UX Design Techdegree Student 13,865 Pointsinvalid syntax (delete.py, line 2) when i solved the 2 challenge , i see this phrase invalid syntax (delete.py, line 2)
Kevin Faust
15,353 Pointscan you post your code that you have?
Yasser Shaaf
UX Design Techdegree Student 13,865 Pointshow could you cut and post ?
Kevin Faust
15,353 Pointsselect all your code, press ctrl + c, then do ctrl + v here
Yasser Shaaf
UX Design Techdegree Student 13,865 Pointscurrent_count = 14 del planned = 5 upcoming_releases = 2 total = current_count + upcoming_releases
Yasser Shaaf
UX Design Techdegree Student 13,865 Pointstotal = current_count + upcoming_releases
Yasser Shaaf
UX Design Techdegree Student 13,865 Pointscurrent_count = 14 del planned upcoming_releases = 2 total = current_count + upcoming_releases
even wrong
Kevin Faust
15,353 PointsWhere is your planned variable?? That is not what i wrote. Please read what i wrote above.
Yasser Shaaf
UX Design Techdegree Student 13,865 Pointsperfect , was this challenge is difficult or i am dumb :)
Yasser Shaaf
UX Design Techdegree Student 13,865 PointsPerfect , was this challenge difficult or i am dumb :)
Kevin Faust
15,353 PointsLol this challenge was not too difficult but its ok if you have troubles. Learning is never easy