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 trialseong lee
4,503 PointsPLEASE HELP! I'm in a struggle here please help.
I am not understanding why it keeps saying "please try again". Thank you in advance!
COURSES = {
"Python Basics": {"Python", "functions", "variables",
"booleans", "integers", "floats",
"arrays", "strings", "exceptions",
"conditions", "input", "loops"},
"Java Basics": {"Java", "strings", "variables",
"input", "exceptions", "integers",
"booleans", "loops"},
"PHP Basics": {"PHP", "variables", "conditions",
"integers", "floats", "strings",
"booleans", "HTML"},
"Ruby Basics": {"Ruby", "strings", "floats",
"integers", "conditions",
"functions", "input"}
def covers(topics):
listing = []
for thing in COURSES.items():
a, b = thing
if topics.intersection(b) :
listing.append(a)
return listing
}
2 Answers
Chris Freeman
Treehouse Moderator 68,441 PointsLook like you have an extra trailing curly bracket at the bottom of your code.
Post back if you need more help. Good luck!!
seong lee
4,503 PointsI did the exact same thing but it did not work with the other code on top
Chris Freeman
Treehouse Moderator 68,441 PointsPlease post your lates attempt
seong lee
4,503 Pointsseong lee
4,503 Pointsthat wasn't the problem I tried but it did not work
Chris Freeman
Treehouse Moderator 68,441 PointsChris Freeman
Treehouse Moderator 68,441 PointsIf I literally cut-and-paste your above code:
It passes Task 1. It doesn't look like you've started on Task 2 yet.