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 trialOmid Ashtari
4,813 PointsLine Endings - works in my console, but test won't pass :(
hi, need a little help, why won't this pass? - thx
TILES = ('-', ' ', '-', ' ', '-', '||',
'_', '|', '_', '|', '_', '|', '||',
'&', ' ', '_', ' ', '||',
' ', ' ', ' ', '^', ' ', '||'
)
for tile in TILES:
if tile == "||":
line_end = "\n"
print("", end=line_end)
else:
line_end = ""
print(tile, end=line_end)
2 Answers
Kenneth Love
Treehouse Guest TeacherI've updated the code challenge so hopefully there'll be less confusion from now on. Thanks for bringing it up!
Steven Parker
231,269 PointsThanks, Kenneth, that makes the challenge solution much more intuitive.
Steven Parker
231,269 PointsYou might also want to submit your bug report to Support.
It may even get you a "special Exterminator badge".
Omid Ashtari
4,813 PointsOmid Ashtari
4,813 Pointsfigured it out by looking at some other questions about this
hey Kenneth Love, it's not very clear that a full empty line needs to be printed every time a || appears, the way I read it, seems to suggest to just print the next set of items on a new line, without the separate extra line to divide items.